rust/tests/ui/error-codes/E0503.rs
2023-01-11 09:32:08 +00:00

10 lines
220 B
Rust

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 { }