new file mode 100644
@@ -0,0 +1,19 @@
+// { dg-options "-frust-name-resolution-2.0" }
+
+mod a {
+ pub mod b {
+ pub fn foo() {}
+ pub fn bar() {}
+ pub fn baz() {}
+ }
+ pub fn baz() {}
+}
+
+use a::b::*;
+use a::baz;
+
+pub fn func() {
+ baz();
+ foo();
+ bar();
+}
new file mode 100644
@@ -0,0 +1,15 @@
+// { dg-options "-frust-name-resolution-2.0" }
+
+mod a {
+ pub mod b {
+ pub fn baz() {}
+ }
+ pub fn baz() {}
+}
+
+use a::b::*;
+use a::*;
+
+pub fn func() {
+ baz(); // { dg-error ".baz. is ambiguous .E0659." }
+}