@@ -11,24 +11,27 @@ LL | | _ => unimplemented!(),
11
11
LL | | };
12
12
| |_____- `match` arms have incompatible types
13
13
|
14
- = note: expected type `fn(i32, i32) -> i32 {add}`
15
- found closure `[closure@$DIR/closure_cap_coerce_many_fail.rs:9:16: 9:43]`
14
+ = note: expected fn item `fn(i32, i32) -> i32 {add}`
15
+ found closure `[closure@$DIR/closure_cap_coerce_many_fail.rs:9:16: 9:43]`
16
16
17
17
error[E0308]: `match` arms have incompatible types
18
18
--> $DIR/closure_cap_coerce_many_fail.rs:18:16
19
19
|
20
20
LL | let _ = match "+" {
21
21
| _____________-
22
22
LL | | "+" => |a, b| (a + b) as i32,
23
- | | --------------------- this is found to be of type `[closure@$DIR/closure_cap_coerce_many_fail.rs:17:16: 17:37]`
23
+ | | ---------------------
24
+ | | |
25
+ | | the expected closure
26
+ | | this is found to be of type `[closure@$DIR/closure_cap_coerce_many_fail.rs:17:16: 17:37]`
24
27
LL | | "-" => |a, b| (a - b + cap) as i32,
25
28
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected closure, found a different closure
26
29
LL | | _ => unimplemented!(),
27
30
LL | | };
28
31
| |_____- `match` arms have incompatible types
29
32
|
30
- = note: expected type `[closure@$DIR/closure_cap_coerce_many_fail.rs:17:16: 17:37]`
31
- found closure `[closure@$DIR/closure_cap_coerce_many_fail.rs:18:16: 18:43]`
33
+ = note: expected closure `[closure@$DIR/closure_cap_coerce_many_fail.rs:17:16: 17:37]`
34
+ found closure `[closure@$DIR/closure_cap_coerce_many_fail.rs:18:16: 18:43]`
32
35
= note: no two closures, even if identical, have the same type
33
36
= help: consider boxing your closure and/or using it as a trait object
34
37
@@ -38,15 +41,18 @@ error[E0308]: `match` arms have incompatible types
38
41
LL | let _ = match "+" {
39
42
| _____________-
40
43
LL | | "+" => |a, b| (a + b + cap) as i32,
41
- | | --------------------------- this is found to be of type `[closure@$DIR/closure_cap_coerce_many_fail.rs:26:16: 26:43]`
44
+ | | ---------------------------
45
+ | | |
46
+ | | the expected closure
47
+ | | this is found to be of type `[closure@$DIR/closure_cap_coerce_many_fail.rs:26:16: 26:43]`
42
48
LL | | "-" => |a, b| (a - b) as i32,
43
49
| | ^^^^^^^^^^^^^^^^^^^^^ expected closure, found a different closure
44
50
LL | | _ => unimplemented!(),
45
51
LL | | };
46
52
| |_____- `match` arms have incompatible types
47
53
|
48
- = note: expected type `[closure@$DIR/closure_cap_coerce_many_fail.rs:26:16: 26:43]`
49
- found closure `[closure@$DIR/closure_cap_coerce_many_fail.rs:27:16: 27:37]`
54
+ = note: expected closure `[closure@$DIR/closure_cap_coerce_many_fail.rs:26:16: 26:43]`
55
+ found closure `[closure@$DIR/closure_cap_coerce_many_fail.rs:27:16: 27:37]`
50
56
= note: no two closures, even if identical, have the same type
51
57
= help: consider boxing your closure and/or using it as a trait object
52
58
@@ -56,15 +62,18 @@ error[E0308]: `match` arms have incompatible types
56
62
LL | let _ = match "+" {
57
63
| _____________-
58
64
LL | | "+" => |a, b| (a + b + cap) as i32,
59
- | | --------------------------- this is found to be of type `[closure@$DIR/closure_cap_coerce_many_fail.rs:34:16: 34:43]`
65
+ | | ---------------------------
66
+ | | |
67
+ | | the expected closure
68
+ | | this is found to be of type `[closure@$DIR/closure_cap_coerce_many_fail.rs:34:16: 34:43]`
60
69
LL | | "-" => |a, b| (a - b + cap) as i32,
61
70
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected closure, found a different closure
62
71
LL | | _ => unimplemented!(),
63
72
LL | | };
64
73
| |_____- `match` arms have incompatible types
65
74
|
66
- = note: expected type `[closure@$DIR/closure_cap_coerce_many_fail.rs:34:16: 34:43]`
67
- found closure `[closure@$DIR/closure_cap_coerce_many_fail.rs:35:16: 35:43]`
75
+ = note: expected closure `[closure@$DIR/closure_cap_coerce_many_fail.rs:34:16: 34:43]`
76
+ found closure `[closure@$DIR/closure_cap_coerce_many_fail.rs:35:16: 35:43]`
68
77
= note: no two closures, even if identical, have the same type
69
78
= help: consider boxing your closure and/or using it as a trait object
70
79
0 commit comments