about summary refs log tree commit diff
path: root/compiler/rustc_monomorphize/src/util.rs
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2021-10-20 20:59:15 +0200
committerCamille GILLOT <gillot.camille@gmail.com>2022-01-15 21:26:25 +0100
commit67727aa7c31a24ea73a91a9134c3653fae8209ab (patch)
treea83a11e73a594aacfad54fadb109b53bf2bef548 /compiler/rustc_monomorphize/src/util.rs
parentebcc847369d5b050cdde870b2261e34afed8679f (diff)
downloadrust-67727aa7c31a24ea73a91a9134c3653fae8209ab.tar.gz
rust-67727aa7c31a24ea73a91a9134c3653fae8209ab.zip
Reduce use of local_def_id_to_hir_id.
Diffstat (limited to 'compiler/rustc_monomorphize/src/util.rs')
-rw-r--r--compiler/rustc_monomorphize/src/util.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_monomorphize/src/util.rs b/compiler/rustc_monomorphize/src/util.rs
index 6084cdda227..27540395c07 100644
--- a/compiler/rustc_monomorphize/src/util.rs
+++ b/compiler/rustc_monomorphize/src/util.rs
@@ -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