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