Rollup merge of #137392 - klensy:unused, r=compiler-errors
remove few unused fields Remove unused field and convert hashmap to hashset in second commit.
This commit is contained in:
commit
cfc2d111ed
5 changed files with 4 additions and 6 deletions
|
@ -1370,7 +1370,6 @@ pub struct GlobalCtxt<'tcx> {
|
||||||
|
|
||||||
// Internal caches for metadata decoding. No need to track deps on this.
|
// Internal caches for metadata decoding. No need to track deps on this.
|
||||||
pub ty_rcache: Lock<FxHashMap<ty::CReaderCacheKey, Ty<'tcx>>>,
|
pub ty_rcache: Lock<FxHashMap<ty::CReaderCacheKey, Ty<'tcx>>>,
|
||||||
pub pred_rcache: Lock<FxHashMap<ty::CReaderCacheKey, Predicate<'tcx>>>,
|
|
||||||
|
|
||||||
/// Caches the results of trait selection. This cache is used
|
/// Caches the results of trait selection. This cache is used
|
||||||
/// for things that do not have to do with the parameters in scope.
|
/// for things that do not have to do with the parameters in scope.
|
||||||
|
@ -1601,7 +1600,6 @@ impl<'tcx> TyCtxt<'tcx> {
|
||||||
query_system,
|
query_system,
|
||||||
query_kinds,
|
query_kinds,
|
||||||
ty_rcache: Default::default(),
|
ty_rcache: Default::default(),
|
||||||
pred_rcache: Default::default(),
|
|
||||||
selection_cache: Default::default(),
|
selection_cache: Default::default(),
|
||||||
evaluation_cache: Default::default(),
|
evaluation_cache: Default::default(),
|
||||||
new_solver_evaluation_cache: Default::default(),
|
new_solver_evaluation_cache: Default::default(),
|
||||||
|
|
|
@ -179,7 +179,7 @@ pub struct ResolverGlobalCtxt {
|
||||||
pub confused_type_with_std_module: FxIndexMap<Span, Span>,
|
pub confused_type_with_std_module: FxIndexMap<Span, Span>,
|
||||||
pub doc_link_resolutions: FxIndexMap<LocalDefId, DocLinkResMap>,
|
pub doc_link_resolutions: FxIndexMap<LocalDefId, DocLinkResMap>,
|
||||||
pub doc_link_traits_in_scope: FxIndexMap<LocalDefId, Vec<DefId>>,
|
pub doc_link_traits_in_scope: FxIndexMap<LocalDefId, Vec<DefId>>,
|
||||||
pub all_macro_rules: FxHashMap<Symbol, Res<ast::NodeId>>,
|
pub all_macro_rules: FxHashSet<Symbol>,
|
||||||
pub stripped_cfg_items: Steal<Vec<StrippedCfgItem>>,
|
pub stripped_cfg_items: Steal<Vec<StrippedCfgItem>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1241,7 +1241,7 @@ impl<'a, 'ra, 'tcx> BuildReducedGraphVisitor<'a, 'ra, 'tcx> {
|
||||||
};
|
};
|
||||||
let binding = (res, vis, span, expansion).to_name_binding(self.r.arenas);
|
let binding = (res, vis, span, expansion).to_name_binding(self.r.arenas);
|
||||||
self.r.set_binding_parent_module(binding, parent_scope.module);
|
self.r.set_binding_parent_module(binding, parent_scope.module);
|
||||||
self.r.all_macro_rules.insert(ident.name, res);
|
self.r.all_macro_rules.insert(ident.name);
|
||||||
if is_macro_export {
|
if is_macro_export {
|
||||||
let import = self.r.arenas.alloc_import(ImportData {
|
let import = self.r.arenas.alloc_import(ImportData {
|
||||||
kind: ImportKind::MacroExport,
|
kind: ImportKind::MacroExport,
|
||||||
|
|
|
@ -1220,7 +1220,7 @@ pub struct Resolver<'ra, 'tcx> {
|
||||||
effective_visibilities: EffectiveVisibilities,
|
effective_visibilities: EffectiveVisibilities,
|
||||||
doc_link_resolutions: FxIndexMap<LocalDefId, DocLinkResMap>,
|
doc_link_resolutions: FxIndexMap<LocalDefId, DocLinkResMap>,
|
||||||
doc_link_traits_in_scope: FxIndexMap<LocalDefId, Vec<DefId>>,
|
doc_link_traits_in_scope: FxIndexMap<LocalDefId, Vec<DefId>>,
|
||||||
all_macro_rules: FxHashMap<Symbol, Res>,
|
all_macro_rules: FxHashSet<Symbol>,
|
||||||
|
|
||||||
/// Invocation ids of all glob delegations.
|
/// Invocation ids of all glob delegations.
|
||||||
glob_delegation_invoc_ids: FxHashSet<LocalExpnId>,
|
glob_delegation_invoc_ids: FxHashSet<LocalExpnId>,
|
||||||
|
|
|
@ -1983,7 +1983,7 @@ fn resolution_failure(
|
||||||
.tcx
|
.tcx
|
||||||
.resolutions(())
|
.resolutions(())
|
||||||
.all_macro_rules
|
.all_macro_rules
|
||||||
.contains_key(&Symbol::intern(path_str))
|
.contains(&Symbol::intern(path_str))
|
||||||
{
|
{
|
||||||
diag.note(format!(
|
diag.note(format!(
|
||||||
"`macro_rules` named `{path_str}` exists in this crate, \
|
"`macro_rules` named `{path_str}` exists in this crate, \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue