summaryrefslogtreecommitdiffstats
path: root/tests/ui/enum/enum-and-module-in-same-scope.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/enum/enum-and-module-in-same-scope.rs')
-rw-r--r--tests/ui/enum/enum-and-module-in-same-scope.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/enum/enum-and-module-in-same-scope.rs b/tests/ui/enum/enum-and-module-in-same-scope.rs
new file mode 100644
index 000000000..cc6e199bd
--- /dev/null
+++ b/tests/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() {}