mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +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 { }
|