about summary refs log tree commit diff
path: root/tests/ui/use/use-keyword.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/use/use-keyword.rs')
-rw-r--r--tests/ui/use/use-keyword.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/use/use-keyword.rs b/tests/ui/use/use-keyword.rs
new file mode 100644
index 00000000000..c30c2e06c45
--- /dev/null
+++ b/tests/ui/use/use-keyword.rs
@@ -0,0 +1,17 @@
+// Check that imports with nakes super and self don't fail during parsing
+// FIXME: this shouldn't fail during name resolution either
+
+mod a {
+    mod b {
+        use self as A;
+        //~^ ERROR `self` imports are only allowed within a { } list
+        use super as B;
+        //~^ ERROR unresolved import `super` [E0432]
+        //~| no `super` in the root
+        use super::{self as C};
+        //~^ ERROR unresolved import `super` [E0432]
+        //~| no `super` in the root
+    }
+}
+
+fn main() {}