Reduce use of local_def_id_to_hir_id.
This commit is contained in:
parent
ebcc847369
commit
67727aa7c3
39 changed files with 182 additions and 237 deletions
|
@ -49,8 +49,7 @@ crate fn dump_closure_profile<'tcx>(tcx: TyCtxt<'tcx>, closure_instance: Instanc
|
|||
.map(|l| format!("{:?}", l.size.bytes()))
|
||||
.unwrap_or_else(|e| format!("Failed {:?}", e));
|
||||
|
||||
let closure_hir_id = tcx.hir().local_def_id_to_hir_id(closure_def_id.expect_local());
|
||||
let closure_span = tcx.hir().span(closure_hir_id);
|
||||
let closure_span = tcx.def_span(closure_def_id);
|
||||
let src_file = tcx.sess.source_map().span_to_filename(closure_span);
|
||||
let line_nos = tcx
|
||||
.sess
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue