1 struct Foo(Box<isize>, isize);
3 struct Bar(isize, isize);
10 let x: (Box<_>, _) = (Box::new(1), 2);
12 let y = x; //~ ERROR cannot move out of `x` because it is borrowed
18 let b = &mut x.0; //~ ERROR cannot borrow `x.0` as mutable because it is also borrowed as
23 let b = &mut x.0; //~ ERROR cannot borrow `x.0` as mutable more than once at a time
26 let x = Foo(Box::new(1), 2);
28 let y = x; //~ ERROR cannot move out of `x` because it is borrowed
31 let mut x = Bar(1, 2);
33 let b = &mut x.0; //~ ERROR cannot borrow `x.0` as mutable because it is also borrowed as
36 let mut x = Bar(1, 2);
38 let b = &mut x.0; //~ ERROR cannot borrow `x.0` as mutable more than once at a time
42 trait Fake { fn use_mut(&mut self) { } fn use_ref(&self) { } }
43 impl<T> Fake for T { }