1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
struct Struct;
//~^ NOTE function or associated item `fob` not found for this struct
impl Struct {
fn foo() { }
}
mod module {
fn foo() { }
struct Struct;
impl Struct {
fn foo() { }
}
}
trait Trait {
fn foo();
}
fn main() {
Struct::fob();
//~^ ERROR no function or associated item named `fob` found for struct `Struct` in the current scope
//~| NOTE function or associated item not found in `Struct`
Struc::foo();
//~^ ERROR failed to resolve: use of undeclared type `Struc`
//~| NOTE use of undeclared type `Struc`
modul::foo();
//~^ ERROR failed to resolve: use of undeclared crate or module `modul`
//~| NOTE use of undeclared crate or module `modul`
module::Struc::foo();
//~^ ERROR failed to resolve: could not find `Struc` in `module`
//~| NOTE could not find `Struc` in `module`
Trai::foo();
//~^ ERROR failed to resolve: use of undeclared type `Trai`
//~| NOTE use of undeclared type `Trai`
}
|