]> git.proxmox.com Git - rustc.git/blob - src/test/ui/issues/issue-24036.rs
New upstream version 1.34.2+dfsg1
[rustc.git] / src / test / ui / issues / issue-24036.rs
1 fn closure_to_loc() {
2 let mut x = |c| c + 1;
3 x = |c| c + 1;
4 //~^ ERROR mismatched types
5 }
6
7 fn closure_from_match() {
8 let x = match 1usize {
9 1 => |c| c + 1,
10 2 => |c| c - 1,
11 _ => |c| c - 1
12 };
13 //~^^^ ERROR match arms have incompatible types
14 }
15
16 fn main() { }