Skip to content

Commit bf9f60a

Browse files
committed
Allow glob imports to be shadowed by items and single imports.
1 parent 2b60207 commit bf9f60a

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/librustc_resolve/resolve_imports.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -213,14 +213,8 @@ impl<'a> NameResolution<'a> {
213213
None => return,
214214
};
215215

216+
if !binding.defined_with(DefModifiers::GLOB_IMPORTED) { return }
216217
for duplicate_glob in self.duplicate_globs.iter() {
217-
// FIXME #31337: We currently allow items to shadow glob-imported re-exports.
218-
if !binding.is_import() {
219-
if let NameBindingKind::Import { binding, .. } = duplicate_glob.kind {
220-
if binding.is_import() { continue }
221-
}
222-
}
223-
224218
report(duplicate_glob, binding);
225219
}
226220
}

0 commit comments

Comments
 (0)