File tree Expand file tree Collapse file tree 3 files changed +1
-8
lines changed
compiler/rustc_middle/src
src/tools/clippy/clippy_lints/src Expand file tree Collapse file tree 3 files changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -2264,9 +2264,6 @@ rustc_queries! {
2264
2264
query maybe_unused_trait_imports( _: ( ) ) -> & ' tcx FxIndexSet <LocalDefId > {
2265
2265
desc { "fetching potentially unused trait imports" }
2266
2266
}
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
- }
2270
2267
2271
2268
query stability_index( _: ( ) ) -> & ' tcx stability:: Index {
2272
2269
arena_cache
Original file line number Diff line number Diff line change @@ -3417,10 +3417,6 @@ pub struct DeducedParamAttrs {
3417
3417
pub fn provide ( providers : & mut Providers ) {
3418
3418
providers. maybe_unused_trait_imports =
3419
3419
|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
-
3424
3420
providers. extern_mod_stmt_cnum =
3425
3421
|tcx, id| tcx. resolutions ( ( ) ) . extern_crate_map . get ( & id) . cloned ( ) ;
3426
3422
providers. is_panic_runtime =
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ impl LateLintPass<'_> for WildcardImports {
130
130
}
131
131
if let ItemKind :: Use ( use_path, UseKind :: Glob ) = & item. kind
132
132
&& ( 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 )
134
134
&& !used_imports. is_empty ( ) // Already handled by `unused_imports`
135
135
&& !used_imports. contains ( & kw:: Underscore )
136
136
{
You can’t perform that action at this time.
0 commit comments