]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-24036.rs
Rollup merge of #62337 - Mark-Simulacrum:fix-cpu-usage-script, r=alexcrichton
[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 match arms have incompatible types
14 }
15
16 fn main() { }