Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 141301c

Browse files
Unrolled build for #143372
Rollup merge of #143372 - cjgillot:bare-glob-map, r=petrochenkov Remove names_imported_by_glob_use query. Based on #143247 r? ``@ghost`` for perf
2 parents e384365 + 2d3ff91 commit 141301c

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
@@ -3417,10 +3417,6 @@ pub struct DeducedParamAttrs {
34173417
pub fn provide(providers: &mut Providers) {
34183418
providers.maybe_unused_trait_imports =
34193419
|tcx, ()| &tcx.resolutions(()).maybe_unused_trait_imports;
3420-
providers.names_imported_by_glob_use = |tcx, id| {
3421-
tcx.arena.alloc(tcx.resolutions(()).glob_map.get(&id).cloned().unwrap_or_default())
3422-
};
3423-
34243420
providers.extern_mod_stmt_cnum =
34253421
|tcx, id| tcx.resolutions(()).extern_crate_map.get(&id).cloned();
34263422
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)

AltStyle によって変換されたページ (->オリジナル) /