summaryrefslogtreecommitdiffstats
path: root/src/test/ui/use/use-keyword.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/use/use-keyword.rs')
-rw-r--r--src/test/ui/use/use-keyword.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/ui/use/use-keyword.rs b/src/test/ui/use/use-keyword.rs
new file mode 100644
index 000000000..c30c2e06c
--- /dev/null
+++ b/src/test/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() {}