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