@@ -1160,9 +1160,9 @@ impl<'a, 'b> DefIdTree for &'a Resolver<'b> {
1160
1160
/// This interface is used through the AST→HIR step, to embed full paths into the HIR. After that
1161
1161
/// the resolver is no longer needed as all the relevant information is inline.
1162
1162
impl ResolverAstLowering for Resolver < ' _ > {
1163
- fn def_key ( & mut self , id : DefId ) -> DefKey {
1163
+ fn def_key ( & self , id : DefId ) -> DefKey {
1164
1164
if let Some ( id) = id. as_local ( ) {
1165
- self . definitions ( ) . def_key ( id)
1165
+ self . definitions . def_key ( id)
1166
1166
} else {
1167
1167
self . cstore ( ) . def_key ( id)
1168
1168
}
@@ -1189,22 +1189,22 @@ impl ResolverAstLowering for Resolver<'_> {
1189
1189
self . partial_res_map . get ( & id) . cloned ( )
1190
1190
}
1191
1191
1192
- fn get_import_res ( & mut self , id : NodeId ) -> PerNS < Option < Res > > {
1192
+ fn get_import_res ( & self , id : NodeId ) -> PerNS < Option < Res > > {
1193
1193
self . import_res_map . get ( & id) . cloned ( ) . unwrap_or_default ( )
1194
1194
}
1195
1195
1196
- fn get_label_res ( & mut self , id : NodeId ) -> Option < NodeId > {
1196
+ fn get_label_res ( & self , id : NodeId ) -> Option < NodeId > {
1197
1197
self . label_res_map . get ( & id) . cloned ( )
1198
1198
}
1199
1199
1200
- fn definitions ( & mut self ) -> & mut Definitions {
1201
- & mut self . definitions
1202
- }
1203
-
1204
1200
fn create_stable_hashing_context ( & self ) -> StableHashingContext < ' _ > {
1205
1201
StableHashingContext :: new ( self . session , & self . definitions , self . crate_loader . cstore ( ) )
1206
1202
}
1207
1203
1204
+ fn definitions ( & self ) -> & Definitions {
1205
+ & self . definitions
1206
+ }
1207
+
1208
1208
fn lint_buffer ( & mut self ) -> & mut LintBuffer {
1209
1209
& mut self . lint_buffer
1210
1210
}
0 commit comments