rust/src/test/ui/did_you_mean/issue-34126.rs

15 lines
228 B
Rust
Raw Normal View History

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
//~| ERROR cannot borrow
2016-11-01 23:15:02 -07:00
}
}
fn main() {
let mut z = Z {};
z.start();
}