]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-24036.rs
Rollup merge of #91804 - woppopo:const_clone, r=oli-obk
[rust.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 type annotations needed
14 }
15
16 fn main() { }