1 // Tests that two closures cannot simultaneously both have mutable
2 // access to the variable. Related to issue #6801.
4 fn get(x: &isize) -> isize {
8 fn set(x: &mut isize) {
13 let mut c1 = || set(&mut *x);
14 let mut c2 = || set(&mut *x);
15 //~^ ERROR two closures require unique access to `x` at the same time