File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ Names may not be resolved through ambiguous glob imports. Glob imports are allow
152152
153153For example:
154154
155- ``` rust
155+ ``` rust,compile_fail,E0659
156156mod foo {
157157 pub struct Qux;
158158}
@@ -165,10 +165,21 @@ use foo::*;
165165use bar::*; // OK, no name conflict.
166166
167167fn ambiguous_use() {
168- // This would be an error, due to the ambiguity.
169- // let x = Qux;
168+ let x = Qux; // ERROR: `Qux` is ambiguous
170169}
170+ ```
171171
172+ ``` rust
173+ # mod foo {
174+ # pub struct Qux ;
175+ # }
176+ #
177+ # mod bar {
178+ # pub struct Qux ;
179+ # }
180+ #
181+ # use foo :: * ;
182+ # use bar :: * ; // OK, no name conflict.
172183fn ambiguous_shadow () {
173184 // This is permitted, since resolution is not through the ambiguous globs.
174185 struct Qux ;
You can’t perform that action at this time.
0 commit comments