2018-05-25 05:36:58 -05:00
|
|
|
fn main() {
|
2016-08-25 17:14:20 -05:00
|
|
|
let mut value = 3;
|
|
|
|
let _borrow = &mut value;
|
|
|
|
let _sum = value + 1; //~ ERROR E0503
|
2018-05-25 05:36:58 -05:00
|
|
|
_borrow.use_mut();
|
2016-08-25 17:14:20 -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 { }
|