2016-08-17 16:45:10 -05:00
|
|
|
struct Foo;
|
|
|
|
|
|
|
|
impl Foo {
|
|
|
|
fn bar(self) {}
|
|
|
|
|
|
|
|
fn foo() {
|
2016-11-30 16:35:25 -06:00
|
|
|
self.bar(); //~ ERROR E0424
|
2016-08-17 16:45:10 -05:00
|
|
|
}
|
2020-08-13 19:52:33 -05:00
|
|
|
|
|
|
|
fn baz(_: i32) {
|
|
|
|
self.bar(); //~ ERROR E0424
|
|
|
|
}
|
2020-10-17 06:36:59 -05:00
|
|
|
|
|
|
|
fn qux() {
|
|
|
|
let _ = || self.bar(); //~ ERROR E0424
|
|
|
|
}
|
2016-08-17 16:45:10 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main () {
|
2018-11-12 14:50:27 -06:00
|
|
|
let self = "self"; //~ ERROR E0424
|
2016-08-17 16:45:10 -05:00
|
|
|
}
|