2019-11-30 17:59:51 +00:00
|
|
|
struct Foo {}
|
|
|
|
|
|
|
|
impl Foo {
|
|
|
|
fn foo(&self) {
|
|
|
|
bar(self);
|
|
|
|
//~^ ERROR cannot find function `bar` in this scope
|
2019-12-09 15:05:45 +00:00
|
|
|
//~| HELP try calling `bar` as a method
|
2019-11-30 17:59:51 +00:00
|
|
|
|
2019-12-09 15:05:45 +00:00
|
|
|
bar(&&self, 102);
|
|
|
|
//~^ ERROR cannot find function `bar` in this scope
|
|
|
|
//~| HELP try calling `bar` as a method
|
2019-11-30 17:59:51 +00:00
|
|
|
|
2019-12-09 15:05:45 +00:00
|
|
|
bar(&mut self, 102, &"str");
|
2019-11-30 17:59:51 +00:00
|
|
|
//~^ ERROR cannot find function `bar` in this scope
|
2019-12-09 15:05:45 +00:00
|
|
|
//~| HELP try calling `bar` as a method
|
2019-11-30 17:59:51 +00:00
|
|
|
|
|
|
|
bar();
|
|
|
|
//~^ ERROR cannot find function `bar` in this scope
|
|
|
|
|
|
|
|
self.bar();
|
2020-01-08 16:05:31 +00:00
|
|
|
//~^ ERROR no method named `bar` found for reference
|
2019-11-30 17:59:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|