summaryrefslogtreecommitdiffstats
path: root/src/test/ui/error-codes/E0499.rs
blob: 919f97c8a5c3da47dc7b2556af671b36316373f0 (plain)
1
2
3
4
5
6
7
8
9
10
fn main() {
    let mut i = 0;
    let mut x = &mut i;
    let mut a = &mut i; //~ ERROR E0499
    a.use_mut();
    x.use_mut();
}

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