summaryrefslogtreecommitdiffstats
path: root/src/test/ui/enum/enum-and-module-in-same-scope.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/enum/enum-and-module-in-same-scope.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/enum/enum-and-module-in-same-scope.rs b/src/test/ui/enum/enum-and-module-in-same-scope.rs
new file mode 100644
index 000000000..cc6e199bd
--- /dev/null
+++ b/src/test/ui/enum/enum-and-module-in-same-scope.rs
@@ -0,0 +1,10 @@
+enum Foo {
+ X
+}
+
+mod Foo { //~ ERROR the name `Foo` is defined multiple times
+ pub static X: isize = 42;
+ fn f() { f() } // Check that this does not result in a resolution error
+}
+
+fn main() {}