| struct Foo(Box<isize>, isize); |
| struct Bar(isize, isize); |
| let x: (Box<_>, _) = (Box::new(1), 2); |
| let y = x; //~ ERROR cannot move out of `x` because it is borrowed |
| let b = &mut x.0; //~ ERROR cannot borrow `x.0` as mutable because it is also borrowed as |
| let b = &mut x.0; //~ ERROR cannot borrow `x.0` as mutable more than once at a time |
| let x = Foo(Box::new(1), 2); |
| let y = x; //~ ERROR cannot move out of `x` because it is borrowed |
| let b = &mut x.0; //~ ERROR cannot borrow `x.0` as mutable because it is also borrowed as |
| let b = &mut x.0; //~ ERROR cannot borrow `x.0` as mutable more than once at a time |
| trait Fake { fn use_mut(&mut self) { } fn use_ref(&self) { } } |