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

11 lines
219 B
Rust

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