fork/rust
git clone https://git.julia.blue/fork/rust
f3e1a954d2e
1.41.1
1error[E0308]: mismatched types 2 --> $DIR/issue-24036.rs:3:9 3 | 4LL | x = |c| c + 1; 5 | ^^^^^^^^^ expected closure, found a different closure 6 | 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]` 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 12error[E0308]: match arms have incompatible types 13 --> $DIR/issue-24036.rs:10:14 14 | 15LL | let x = match 1usize { 16 | _____________- 17LL | | 1 => |c| c + 1, 18 | | --------- this is found to be of type `[closure@$DIR/issue-24036.rs:9:14: 9:23]` 19LL | | 2 => |c| c - 1, 20 | | ^^^^^^^^^ expected closure, found a different closure 21LL | | _ => |c| c - 1 22LL | | }; 23 | |_____- `match` arms have incompatible types 24 | 25 = note: expected type `[closure@$DIR/issue-24036.rs:9:14: 9:23]` 26 found closure `[closure@$DIR/issue-24036.rs:10:14: 10: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 30error: aborting due to 2 previous errors 31 32For more information about this error, try `rustc --explain E0308`.