blob: afe87f47eadbee6076a1c16a690f24e1a991c913 [file] [log] [blame]
// Test that closures cannot subvert aliasing restrictions
fn main() {
// Unboxed closure case
{
let mut x = 0;
let mut f = || &mut x; //~ ERROR cannot infer
let x = f();
let y = f();
}
}