Avoid a node_id_to_def_id call by just storing DefIds instead of NodeIds

This commit is contained in:
Oli Scherer
2025-04-11 09:34:29 +00:00
parent 33a6820c2f
commit d35e830aad
3 changed files with 4 additions and 5 deletions

View File

@@ -1200,7 +1200,7 @@ pub struct Resolver<'ra, 'tcx> {
trait_impls: FxIndexMap<DefId, Vec<LocalDefId>>,
/// A list of proc macro LocalDefIds, written out in the order in which
/// they are declared in the static array generated by proc_macro_harness.
proc_macros: Vec<NodeId>,
proc_macros: Vec<LocalDefId>,
confused_type_with_std_module: FxIndexMap<Span, Span>,
/// Whether lifetime elision was successful.
lifetime_elision_allowed: FxHashSet<NodeId>,
@@ -1640,7 +1640,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
}
pub fn into_outputs(self) -> ResolverOutputs {
let proc_macros = self.proc_macros.iter().map(|id| self.local_def_id(*id)).collect();
let proc_macros = self.proc_macros;
let expn_that_defined = self.expn_that_defined;
let extern_crate_map = self.extern_crate_map;
let maybe_unused_trait_imports = self.maybe_unused_trait_imports;