]> git.lizzy.rs Git - rust.git/blob - src/test/ui/error-codes/E0424.rs
Merge commit 'd3a2366ee877075c59b38bd8ced55f224fc7ef51' into sync_cg_clif-2022-07-26
[rust.git] / src / test / ui / error-codes / E0424.rs
1 struct Foo;
2
3 impl Foo {
4     fn bar(self) {}
5
6     fn foo() {
7         self.bar(); //~ ERROR E0424
8     }
9
10     fn baz(_: i32) {
11         self.bar(); //~ ERROR E0424
12     }
13
14     fn qux() {
15         let _ = || self.bar(); //~ ERROR E0424
16     }
17 }
18
19 fn main () {
20     let self = "self"; //~ ERROR E0424
21 }