2016-11-01 23:15:02 -07:00
|
|
|
struct Z { }
|
|
|
|
|
|
|
|
impl Z {
|
|
|
|
fn run(&self, z: &mut Z) { }
|
|
|
|
fn start(&mut self) {
|
2017-11-20 13:13:27 +01:00
|
|
|
self.run(&mut self); //~ ERROR cannot borrow
|
2019-04-22 08:40:08 +01:00
|
|
|
//~| ERROR cannot borrow
|
2021-07-25 10:23:48 -04:00
|
|
|
//~| HELP try removing `&mut` here
|
2016-11-01 23:15:02 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let mut z = Z {};
|
|
|
|
z.start();
|
|
|
|
}
|