about summary refs log tree commit diff
path: root/tests/ui/use/use-mod/use-mod-6.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/use/use-mod/use-mod-6.rs')
-rw-r--r--tests/ui/use/use-mod/use-mod-6.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/use/use-mod/use-mod-6.rs b/tests/ui/use/use-mod/use-mod-6.rs
new file mode 100644
index 00000000000..1f8777daca4
--- /dev/null
+++ b/tests/ui/use/use-mod/use-mod-6.rs
@@ -0,0 +1,13 @@
+mod foo {
+    pub mod bar {
+        pub fn drop() {}
+    }
+}
+
+use foo::bar::self as abc;
+//~^ ERROR `self` imports are only allowed within a { } list
+
+fn main() {
+    // Because of error recovery this shouldn't error
+    abc::drop();
+}