]> git.lizzy.rs Git - rust.git/blob - tests/ui/resolve/typo-suggestion-mistyped-in-path.rs
Rollup merge of #106709 - khuey:disable_split_dwarf_inlining_by_default, r=davidtwco
[rust.git] / tests / ui / resolve / typo-suggestion-mistyped-in-path.rs
1 struct Struct;
2 //~^ NOTE function or associated item `fob` not found for this struct
3
4 impl Struct {
5     fn foo() { }
6 }
7
8 mod module {
9     fn foo() { }
10
11     struct Struct;
12
13     impl Struct {
14         fn foo() { }
15     }
16 }
17
18 trait Trait {
19     fn foo();
20 }
21
22 fn main() {
23     Struct::fob();
24     //~^ ERROR no function or associated item named `fob` found for struct `Struct` in the current scope
25     //~| NOTE function or associated item not found in `Struct`
26
27     Struc::foo();
28     //~^ ERROR failed to resolve: use of undeclared type `Struc`
29     //~| NOTE use of undeclared type `Struc`
30
31     modul::foo();
32     //~^ ERROR failed to resolve: use of undeclared crate or module `modul`
33     //~| NOTE use of undeclared crate or module `modul`
34
35     module::Struc::foo();
36     //~^ ERROR failed to resolve: could not find `Struc` in `module`
37     //~| NOTE could not find `Struc` in `module`
38
39     Trai::foo();
40     //~^ ERROR failed to resolve: use of undeclared type `Trai`
41     //~| NOTE use of undeclared type `Trai`
42 }