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