Skip to content

Commit f38f3af

Browse files
committed
Remove some resolver outputs.
1 parent 958419d commit f38f3af

File tree

5 files changed

+0
-19
lines changed

5 files changed

+0
-19
lines changed

compiler/rustc_middle/src/query/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1830,9 +1830,6 @@ rustc_queries! {
18301830
query maybe_unused_trait_imports(_: ()) -> &'tcx FxIndexSet<LocalDefId> {
18311831
desc { "fetching potentially unused trait imports" }
18321832
}
1833-
query maybe_unused_extern_crates(_: ()) -> &'tcx [(LocalDefId, Span)] {
1834-
desc { "looking up all possibly unused extern crates" }
1835-
}
18361833
query names_imported_by_glob_use(def_id: LocalDefId) -> &'tcx FxHashSet<Symbol> {
18371834
desc { |tcx| "finding names imported by glob use for `{}`", tcx.def_path_str(def_id.to_def_id()) }
18381835
}

compiler/rustc_middle/src/ty/context.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2504,8 +2504,6 @@ pub fn provide(providers: &mut ty::query::Providers) {
25042504
|tcx, id| tcx.resolutions(()).reexport_map.get(&id).map(|v| &v[..]);
25052505
providers.maybe_unused_trait_imports =
25062506
|tcx, ()| &tcx.resolutions(()).maybe_unused_trait_imports;
2507-
providers.maybe_unused_extern_crates =
2508-
|tcx, ()| &tcx.resolutions(()).maybe_unused_extern_crates[..];
25092507
providers.names_imported_by_glob_use = |tcx, id| {
25102508
tcx.arena.alloc(tcx.resolutions(()).glob_map.get(&id).cloned().unwrap_or_default())
25112509
};

compiler/rustc_middle/src/ty/mod.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,8 @@ pub struct ResolverGlobalCtxt {
168168
pub effective_visibilities: EffectiveVisibilities,
169169
pub extern_crate_map: FxHashMap<LocalDefId, CrateNum>,
170170
pub maybe_unused_trait_imports: FxIndexSet<LocalDefId>,
171-
pub maybe_unused_extern_crates: Vec<(LocalDefId, Span)>,
172171
pub reexport_map: FxHashMap<LocalDefId, Vec<ModChild>>,
173172
pub glob_map: FxHashMap<LocalDefId, FxHashSet<Symbol>>,
174-
/// Extern prelude entries. The value is `true` if the entry was introduced
175-
/// via `extern crate` item and not `--extern` option or compiler built-in.
176-
pub extern_prelude: FxHashMap<Symbol, bool>,
177173
pub main_def: Option<MainDefinition>,
178174
pub trait_impls: FxIndexMap<DefId, Vec<LocalDefId>>,
179175
/// A list of proc macro LocalDefIds, written out in the order in which

compiler/rustc_resolve/src/check_unused.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,6 @@ impl Resolver<'_, '_> {
278278
}
279279
ImportKind::ExternCrate { id, .. } => {
280280
let def_id = self.local_def_id(id);
281-
self.maybe_unused_extern_crates.push((def_id, import.span));
282281
if self.extern_crate_map.get(&def_id).map_or(true, |&cnum| {
283282
!tcx.is_compiler_builtins(cnum)
284283
&& !tcx.is_panic_runtime(cnum)

compiler/rustc_resolve/src/lib.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,6 @@ pub struct Resolver<'a, 'tcx> {
946946
has_pub_restricted: bool,
947947
used_imports: FxHashSet<NodeId>,
948948
maybe_unused_trait_imports: FxIndexSet<LocalDefId>,
949-
maybe_unused_extern_crates: Vec<(LocalDefId, Span)>,
950949

951950
/// Privacy errors are delayed until the end in order to deduplicate them.
952951
privacy_errors: Vec<PrivacyError<'a>>,
@@ -1284,7 +1283,6 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
12841283
has_pub_restricted: false,
12851284
used_imports: FxHashSet::default(),
12861285
maybe_unused_trait_imports: Default::default(),
1287-
maybe_unused_extern_crates: Vec::new(),
12881286

12891287
privacy_errors: Vec::new(),
12901288
ambiguity_errors: Vec::new(),
@@ -1400,7 +1398,6 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
14001398
let extern_crate_map = self.extern_crate_map;
14011399
let reexport_map = self.reexport_map;
14021400
let maybe_unused_trait_imports = self.maybe_unused_trait_imports;
1403-
let maybe_unused_extern_crates = self.maybe_unused_extern_crates;
14041401
let glob_map = self.glob_map;
14051402
let main_def = self.main_def;
14061403
let confused_type_with_std_module = self.confused_type_with_std_module;
@@ -1414,12 +1411,6 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
14141411
reexport_map,
14151412
glob_map,
14161413
maybe_unused_trait_imports,
1417-
maybe_unused_extern_crates,
1418-
extern_prelude: self
1419-
.extern_prelude
1420-
.iter()
1421-
.map(|(ident, entry)| (ident.name, entry.introduced_by_item))
1422-
.collect(),
14231414
main_def,
14241415
trait_impls: self.trait_impls,
14251416
proc_macros,

0 commit comments

Comments
 (0)