about summary refs log tree commit diff
path: root/tests/ui/codemap_tests/issue-11715.rs
blob: d0daaf444b34df9df43ed32639c4df35b7567748 (plain)
1
2
3
4
5
6
7
8
9
10
fn main() {
    let mut x = "foo";
    let y = &mut x;
    let z = &mut x; //~ ERROR cannot borrow
    z.use_mut();
    y.use_mut();
}

trait Fake { fn use_mut(&mut self) { } fn use_ref(&self) { }  }
impl<T> Fake for T { }