]>
Commit | Line | Data |
---|---|---|
ff7c6d11 | 1 | error[E0308]: mismatched types |
0731742a | 2 | --> $DIR/issue-24036.rs:3:9 |
ff7c6d11 | 3 | | |
0531ce1d | 4 | LL | x = |c| c + 1; |
ff7c6d11 XL |
5 | | ^^^^^^^^^ expected closure, found a different closure |
6 | | | |
60c5eb7d XL |
7 | = note: expected closure `[closure@$DIR/issue-24036.rs:2:17: 2:26]` |
8 | found closure `[closure@$DIR/issue-24036.rs:3:9: 3:18]` | |
ff7c6d11 XL |
9 | = note: no two closures, even if identical, have the same type |
10 | = help: consider boxing your closure and/or using it as a trait object | |
11 | ||
12 | error[E0308]: match arms have incompatible types | |
9fa01778 | 13 | --> $DIR/issue-24036.rs:10:14 |
ff7c6d11 | 14 | | |
0531ce1d | 15 | LL | let x = match 1usize { |
9fa01778 | 16 | | _____________- |
0531ce1d | 17 | LL | | 1 => |c| c + 1, |
9fa01778 | 18 | | | --------- this is found to be of type `[closure@$DIR/issue-24036.rs:9:14: 9:23]` |
0531ce1d | 19 | LL | | 2 => |c| c - 1, |
9fa01778 | 20 | | | ^^^^^^^^^ expected closure, found a different closure |
0531ce1d XL |
21 | LL | | _ => |c| c - 1 |
22 | LL | | }; | |
9fa01778 | 23 | | |_____- `match` arms have incompatible types |
ff7c6d11 | 24 | | |
9fa01778 | 25 | = note: expected type `[closure@$DIR/issue-24036.rs:9:14: 9:23]` |
60c5eb7d | 26 | found closure `[closure@$DIR/issue-24036.rs:10:14: 10:23]` |
ff7c6d11 XL |
27 | = note: no two closures, even if identical, have the same type |
28 | = help: consider boxing your closure and/or using it as a trait object | |
29 | ||
30 | error: aborting due to 2 previous errors | |
31 | ||
0531ce1d | 32 | For more information about this error, try `rustc --explain E0308`. |