Remove further usage of &hir::Map
This commit is contained in:
parent
89ac81a6e6
commit
7eff2feb62
6 changed files with 24 additions and 27 deletions
|
@ -262,7 +262,7 @@ impl<'tcx> DumpVisitor<'tcx> {
|
|||
) {
|
||||
debug!("process_method: {:?}:{}", def_id, ident);
|
||||
|
||||
let map = &self.tcx.hir();
|
||||
let map = self.tcx.hir();
|
||||
let hir_id = map.local_def_id_to_hir_id(def_id);
|
||||
self.nest_typeck_results(def_id, |v| {
|
||||
if let Some(mut method_data) = v.save_ctxt.get_method_data(hir_id, ident, span) {
|
||||
|
@ -361,7 +361,7 @@ impl<'tcx> DumpVisitor<'tcx> {
|
|||
ty_params: &'tcx hir::Generics<'tcx>,
|
||||
body: hir::BodyId,
|
||||
) {
|
||||
let map = &self.tcx.hir();
|
||||
let map = self.tcx.hir();
|
||||
self.nest_typeck_results(item.def_id, |v| {
|
||||
let body = map.body(body);
|
||||
if let Some(fn_data) = v.save_ctxt.get_item_data(item) {
|
||||
|
@ -626,7 +626,7 @@ impl<'tcx> DumpVisitor<'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
let map = &self.tcx.hir();
|
||||
let map = self.tcx.hir();
|
||||
self.nest_typeck_results(item.def_id, |v| {
|
||||
v.visit_ty(&impl_.self_ty);
|
||||
if let Some(trait_ref) = &impl_.of_trait {
|
||||
|
@ -716,7 +716,7 @@ impl<'tcx> DumpVisitor<'tcx> {
|
|||
// walk generics and methods
|
||||
self.process_generic_params(generics, &qualname, item.hir_id());
|
||||
for method in methods {
|
||||
let map = &self.tcx.hir();
|
||||
let map = self.tcx.hir();
|
||||
self.process_trait_item(map.trait_item(method.id), item.def_id.to_def_id())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue