Skip to content

Commit 64be5a9

Browse files
committed
Remove names_imported_by_glob_use query.
1 parent 9490320 commit 64be5a9

File tree

3 files changed

+1
-8
lines changed

3 files changed

+1
-8
lines changed

compiler/rustc_middle/src/query/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2264,9 +2264,6 @@ rustc_queries! {
22642264
query maybe_unused_trait_imports(_: ()) -> &'tcx FxIndexSet<LocalDefId> {
22652265
desc { "fetching potentially unused trait imports" }
22662266
}
2267-
query names_imported_by_glob_use(def_id: LocalDefId) -> &'tcx FxIndexSet<Symbol> {
2268-
desc { |tcx| "finding names imported by glob use for `{}`", tcx.def_path_str(def_id) }
2269-
}
22702267

22712268
query stability_index(_: ()) -> &'tcx stability::Index {
22722269
arena_cache

compiler/rustc_middle/src/ty/context.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3413,10 +3413,6 @@ pub struct DeducedParamAttrs {
34133413
pub fn provide(providers: &mut Providers) {
34143414
providers.maybe_unused_trait_imports =
34153415
|tcx, ()| &tcx.resolutions(()).maybe_unused_trait_imports;
3416-
providers.names_imported_by_glob_use = |tcx, id| {
3417-
tcx.arena.alloc(tcx.resolutions(()).glob_map.get(&id).cloned().unwrap_or_default())
3418-
};
3419-
34203416
providers.extern_mod_stmt_cnum =
34213417
|tcx, id| tcx.resolutions(()).extern_crate_map.get(&id).cloned();
34223418
providers.is_panic_runtime =

src/tools/clippy/clippy_lints/src/wildcard_imports.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ impl LateLintPass<'_> for WildcardImports {
130130
}
131131
if let ItemKind::Use(use_path, UseKind::Glob) = &item.kind
132132
&& (self.warn_on_all || !self.check_exceptions(cx, item, use_path.segments))
133-
&& let used_imports = cx.tcx.names_imported_by_glob_use(item.owner_id.def_id)
133+
&& let Some(used_imports) = cx.tcx.resolutions(()).glob_map.get(&item.owner_id.def_id)
134134
&& !used_imports.is_empty() // Already handled by `unused_imports`
135135
&& !used_imports.contains(&kw::Underscore)
136136
{

0 commit comments

Comments
 (0)