Rollup merge of #143372 - cjgillot:bare-glob-map, r=petrochenkov
Remove names_imported_by_glob_use query. Based on https://github.com/rust-lang/rust/pull/143247 r? ``@ghost`` for perf
This commit is contained in:
commit
daf9adbd89
1 changed files with 1 additions and 1 deletions
|
|
@ -130,7 +130,7 @@ impl LateLintPass<'_> for WildcardImports {
|
|||
}
|
||||
if let ItemKind::Use(use_path, UseKind::Glob) = &item.kind
|
||||
&& (self.warn_on_all || !self.check_exceptions(cx, item, use_path.segments))
|
||||
&& let used_imports = cx.tcx.names_imported_by_glob_use(item.owner_id.def_id)
|
||||
&& let Some(used_imports) = cx.tcx.resolutions(()).glob_map.get(&item.owner_id.def_id)
|
||||
&& !used_imports.is_empty() // Already handled by `unused_imports`
|
||||
&& !used_imports.contains(&kw::Underscore)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue