@@ -11,24 +11,27 @@ LL | | _ => unimplemented!(),
1111LL | | };
1212 | |_____- `match` arms have incompatible types
1313 |
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]`
1616
1717error[E0308]: `match` arms have incompatible types
1818 --> $DIR/closure_cap_coerce_many_fail.rs:18:16
1919 |
2020LL | let _ = match "+" {
2121 | _____________-
2222LL | | "+" => |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]`
2427LL | | "-" => |a, b| (a - b + cap) as i32,
2528 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected closure, found a different closure
2629LL | | _ => unimplemented!(),
2730LL | | };
2831 | |_____- `match` arms have incompatible types
2932 |
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]`
3235 = note: no two closures, even if identical, have the same type
3336 = help: consider boxing your closure and/or using it as a trait object
3437
@@ -38,15 +41,18 @@ error[E0308]: `match` arms have incompatible types
3841LL | let _ = match "+" {
3942 | _____________-
4043LL | | "+" => |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]`
4248LL | | "-" => |a, b| (a - b) as i32,
4349 | | ^^^^^^^^^^^^^^^^^^^^^ expected closure, found a different closure
4450LL | | _ => unimplemented!(),
4551LL | | };
4652 | |_____- `match` arms have incompatible types
4753 |
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]`
5056 = note: no two closures, even if identical, have the same type
5157 = help: consider boxing your closure and/or using it as a trait object
5258
@@ -56,15 +62,18 @@ error[E0308]: `match` arms have incompatible types
5662LL | let _ = match "+" {
5763 | _____________-
5864LL | | "+" => |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]`
6069LL | | "-" => |a, b| (a - b + cap) as i32,
6170 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected closure, found a different closure
6271LL | | _ => unimplemented!(),
6372LL | | };
6473 | |_____- `match` arms have incompatible types
6574 |
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]`
6877 = note: no two closures, even if identical, have the same type
6978 = help: consider boxing your closure and/or using it as a trait object
7079
0 commit comments