about summary refs log tree commit diff
path: root/compiler/rustc_monomorphize/src/util.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_monomorphize/src/util.rs')
-rw-r--r--compiler/rustc_monomorphize/src/util.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_monomorphize/src/util.rs b/compiler/rustc_monomorphize/src/util.rs
index 4392c02f874..27540395c07 100644
--- a/compiler/rustc_monomorphize/src/util.rs
+++ b/compiler/rustc_monomorphize/src/util.rs
@@ -7,7 +7,7 @@ use std::io::prelude::*;
 ///
 /// During the same compile all closures dump the information in the same file
 /// "closure_profile_XXXXX.csv", which is created in the directory where the compiler is invoked.
-crate fn dump_closure_profile(tcx: TyCtxt<'tcx>, closure_instance: Instance<'tcx>) {
+crate fn dump_closure_profile<'tcx>(tcx: TyCtxt<'tcx>, closure_instance: Instance<'tcx>) {
     let mut file = if let Ok(file) = OpenOptions::new()
         .create(true)
         .append(true)
@@ -49,8 +49,7 @@ crate fn dump_closure_profile(tcx: TyCtxt<'tcx>, closure_instance: Instance<'tcx
             .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