Files
rust/tests/ui/imports/import.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
467 B
Rust
Raw Normal View History

//@ dont-require-annotations: NOTE
2020-12-07 02:01:35 +03:00
use zed::bar;
use zed::baz; //~ ERROR unresolved import `zed::baz` [E0432]
//~| NOTE no `baz` in `zed`
2020-12-07 02:01:35 +03:00
//~| HELP a similar name exists in the module
//~| SUGGESTION bar
2010-06-23 21:03:09 -07:00
2020-12-07 02:01:35 +03:00
mod zed {
pub fn bar() { println!("bar"); }
use foo; //~ ERROR unresolved import `foo` [E0432]
//~^ NOTE no `foo` in the root
2010-06-23 21:03:09 -07:00
}
2020-12-07 02:01:35 +03:00
fn main() {
zed::foo(); //~ ERROR `foo` is private
bar();
}