mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
11 lines
219 B
Rust
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 { }
|