diff options
Diffstat (limited to 'tests/ui/imports/import.rs')
-rw-r--r-- | tests/ui/imports/import.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/imports/import.rs b/tests/ui/imports/import.rs new file mode 100644 index 000000000..3170dd2fa --- /dev/null +++ b/tests/ui/imports/import.rs @@ -0,0 +1,17 @@ +use zed::bar; +use zed::baz; //~ ERROR unresolved import `zed::baz` [E0432] + //~| no `baz` in `zed` + //~| HELP a similar name exists in the module + //~| SUGGESTION bar + + +mod zed { + pub fn bar() { println!("bar"); } + use foo; //~ ERROR unresolved import `foo` [E0432] + //~^ no `foo` in the root +} + +fn main() { + zed::foo(); //~ ERROR `foo` is private + bar(); +} |