summaryrefslogtreecommitdiffstats
path: root/tests/ui/imports/issue-38293.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/imports/issue-38293.rs')
-rw-r--r--tests/ui/imports/issue-38293.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/imports/issue-38293.rs b/tests/ui/imports/issue-38293.rs
new file mode 100644
index 000000000..3b1393600
--- /dev/null
+++ b/tests/ui/imports/issue-38293.rs
@@ -0,0 +1,16 @@
+// Test that `fn foo::bar::{self}` only imports `bar` in the type namespace.
+
+mod foo {
+ pub fn f() { }
+}
+use foo::f::{self}; //~ ERROR unresolved import `foo::f`
+
+mod bar {
+ pub fn baz() {}
+ pub mod baz {}
+}
+use bar::baz::{self};
+
+fn main() {
+ baz(); //~ ERROR expected function, found module `baz`
+}