@@ -162,7 +162,7 @@ struct LoweringContext<'a, 'hir: 'a> {
162162}
163163
164164pub trait ResolverAstLowering {
165- fn def_key ( & mut self , id : DefId ) -> DefKey ;
165+ fn def_key ( & self , id : DefId ) -> DefKey ;
166166
167167 fn def_span ( & self , id : LocalDefId ) -> Span ;
168168
@@ -174,17 +174,17 @@ pub trait ResolverAstLowering {
174174 fn get_partial_res ( & self , id : NodeId ) -> Option < PartialRes > ;
175175
176176 /// Obtains per-namespace resolutions for `use` statement with the given `NodeId`.
177- fn get_import_res ( & mut self , id : NodeId ) -> PerNS < Option < Res < NodeId > > > ;
177+ fn get_import_res ( & self , id : NodeId ) -> PerNS < Option < Res < NodeId > > > ;
178178
179179 /// Obtains resolution for a label with the given `NodeId`.
180- fn get_label_res ( & mut self , id : NodeId ) -> Option < NodeId > ;
181-
182- /// We must keep the set of definitions up to date as we add nodes that weren't in the AST.
183- /// This should only return `None` during testing.
184- fn definitions ( & mut self ) -> & mut Definitions ;
180+ fn get_label_res ( & self , id : NodeId ) -> Option < NodeId > ;
185181
186182 fn create_stable_hashing_context ( & self ) -> StableHashingContext < ' _ > ;
187183
184+ fn definitions ( & self ) -> & Definitions ;
185+
186+ fn init_def_id_to_hir_id_mapping ( & mut self , mapping : IndexVec < LocalDefId , Option < hir:: HirId > > ) ;
187+
188188 fn lint_buffer ( & mut self ) -> & mut LintBuffer ;
189189
190190 fn next_node_id ( & mut self ) -> NodeId ;
@@ -412,7 +412,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
412412 }
413413 }
414414
415- self . resolver . definitions ( ) . init_def_id_to_hir_id_mapping ( def_id_to_hir_id) ;
415+ self . resolver . init_def_id_to_hir_id_mapping ( def_id_to_hir_id) ;
416416
417417 let krate = hir:: Crate { owners : self . owners , hir_hash } ;
418418 self . arena . alloc ( krate)
0 commit comments