summaryrefslogtreecommitdiffstats
path: root/tests/ui/namespace/namespaced-enum-glob-import-no-impls-xcrate.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/namespace/namespaced-enum-glob-import-no-impls-xcrate.rs')
-rw-r--r--tests/ui/namespace/namespaced-enum-glob-import-no-impls-xcrate.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/namespace/namespaced-enum-glob-import-no-impls-xcrate.rs b/tests/ui/namespace/namespaced-enum-glob-import-no-impls-xcrate.rs
new file mode 100644
index 000000000..feb94b681
--- /dev/null
+++ b/tests/ui/namespace/namespaced-enum-glob-import-no-impls-xcrate.rs
@@ -0,0 +1,15 @@
+// aux-build:namespaced_enums.rs
+extern crate namespaced_enums;
+
+mod m {
+ pub use namespaced_enums::Foo::*;
+}
+
+pub fn main() {
+ use namespaced_enums::Foo::*;
+
+ foo(); //~ ERROR cannot find function `foo` in this scope
+ m::foo(); //~ ERROR cannot find function `foo` in module `m`
+ bar(); //~ ERROR cannot find function `bar` in this scope
+ m::bar(); //~ ERROR cannot find function `bar` in module `m`
+}