rust/tests/ui/suggestions/crate-or-module-typo.rs
Esteban Küber 890ce26213 When using existing fn as module, don't claim it doesn't exist
Tweak wording of module not found in resolve, when the name exists but
belongs to a non-`mod` item.

Fix #81232.
2023-11-16 06:07:33 +00:00

18 lines
414 B
Rust

// edition:2018
use st::cell::Cell; //~ ERROR failed to resolve: use of undeclared crate or module `st`
mod bar {
pub fn bar() { bar::baz(); } //~ ERROR failed to resolve: function `bar` is not a crate or module
fn baz() {}
}
use bas::bar; //~ ERROR unresolved import `bas`
struct Foo {
bar: st::cell::Cell<bool> //~ ERROR failed to resolve: use of undeclared crate or module `st`
}
fn main() {}