1 struct Foo { 2 x: isize, 3 } 4 main()5pub fn main() { 6 let mut this = &mut Foo { 7 x: 1, 8 }; 9 let mut r = || { 10 let p = &this.x; 11 &mut this.x; //~ ERROR cannot borrow 12 p.use_ref(); 13 }; 14 r() 15 } 16 use_mut(&mut self)17trait Fake { fn use_mut(&mut self) { } fn use_ref(&self) { } } 18 impl<T> Fake for T { } 19