]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/assoc_fn_without_self.rs
Rollup merge of #106888 - GuillaumeGomez:tidy-gui-test, r=notriddle
[rust.git] / tests / ui / suggestions / assoc_fn_without_self.rs
1 fn main() {}
2
3 struct S;
4
5 impl S {
6     fn foo() {}
7
8     fn bar(&self) {}
9
10     fn baz(a: u8, b: u8) {}
11
12     fn b() {
13         fn c() {
14             foo(); //~ ERROR cannot find function `foo` in this scope
15         }
16         foo(); //~ ERROR cannot find function `foo` in this scope
17         bar(); //~ ERROR cannot find function `bar` in this scope
18         baz(2, 3); //~ ERROR cannot find function `baz` in this scope
19     }
20 }