]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-24036.stderr
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / issues / issue-24036.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-24036.rs:13:9
3    |
4 LL |     x = |c| c + 1;
5    |         ^^^^^^^^^ expected closure, found a different closure
6    |
7    = note: expected type `[closure@$DIR/issue-24036.rs:12:17: 12:26]`
8               found type `[closure@$DIR/issue-24036.rs:13:9: 13:18]`
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
13   --> $DIR/issue-24036.rs:18:13
14    |
15 LL |       let x = match 1usize {
16    |  _____________^
17 LL | |     //~^ ERROR match arms have incompatible types
18 LL | |         1 => |c| c + 1,
19 LL | |         2 => |c| c - 1,
20    | |              --------- match arm with an incompatible type
21 LL | |         _ => |c| c - 1
22 LL | |     };
23    | |_____^ expected closure, found a different closure
24    |
25    = note: expected type `[closure@$DIR/issue-24036.rs:20:14: 20:23]`
26               found type `[closure@$DIR/issue-24036.rs:21:14: 21:23]`
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
32 For more information about this error, try `rustc --explain E0308`.