summaryrefslogtreecommitdiffstats
path: root/src/test/ui/codemap_tests/issue-11715.rs
blob: 617d57ff75a48526fe16ba323f48a662d45578c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
#![feature(rustc_attrs)]
fn main() { #![rustc_error] // rust-lang/rust#49855
    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 { }