blob: bd82f95c9ef663c8d63a21d2ec616788c0b2cbe9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
fn closure_to_loc() {
let mut x = |c| c + 1;
x = |c| c + 1;
//~^ ERROR mismatched types
}
fn closure_from_match() {
let x = match 1usize {
1 => |c| c + 1,
2 => |c| c - 1,
_ => |c| c - 1
};
//~^^^ ERROR `match` arms have incompatible types
}
fn main() { }
|