2018-05-25 05:36:58 -05:00
|
|
|
fn main() {
|
2016-08-23 08:35:59 -05:00
|
|
|
let mut i = 0;
|
|
|
|
let mut x = &mut i;
|
|
|
|
let mut a = &mut i; //~ ERROR E0499
|
2018-05-25 05:36:58 -05:00
|
|
|
a.use_mut();
|
|
|
|
x.use_mut();
|
2016-08-23 08:35:59 -05:00
|
|
|
}
|
2018-05-25 05:36:58 -05:00
|
|
|
|
|
|
|
trait Fake { fn use_mut(&mut self) { } fn use_ref(&self) { } }
|
|
|
|
impl<T> Fake for T { }
|