summaryrefslogtreecommitdiffstats
path: root/tests/ui/error-codes/E0503.rs
blob: 88f5fc1bbcbf59f3527e254921620dce5c206f37 (plain)
1
2
3
4
5
6
7
8
9
fn main() {
    let mut value = 3;
    let _borrow = &mut value;
    let _sum = value + 1; //~ ERROR E0503
    _borrow.use_mut();
}

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