1 // Check that `&mut` objects cannot be borrowed twice, just like
2 // other `&mut` pointers.
7 fn f1(&mut self) -> &();
11 fn test(x: &mut dyn Foo) {
13 x.f2(); //~ ERROR cannot borrow `*x` as mutable
19 trait Fake { fn use_mut(&mut self) { } fn use_ref(&self) { } }
20 impl<T> Fake for T { }