summaryrefslogtreecommitdiffstats
path: root/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.rs')
-rw-r--r--src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.rs b/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.rs
new file mode 100644
index 000000000..3f5897901
--- /dev/null
+++ b/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.rs
@@ -0,0 +1,20 @@
+// edition:2018
+
+mod my {
+ pub mod sub {
+ pub fn bar() {}
+ }
+}
+
+mod sub {
+ pub fn bar() {}
+}
+
+fn foo() {
+ use my::sub;
+ {
+ use sub::bar; //~ ERROR `sub` is ambiguous
+ }
+}
+
+fn main() {}