]> git.lizzy.rs Git - rust.git/commitdiff
avoid cycles in mir-dump, take 2
authorNiko Matsakis <niko@alum.mit.edu>
Thu, 11 May 2017 21:52:39 +0000 (17:52 -0400)
committerNiko Matsakis <niko@alum.mit.edu>
Tue, 16 May 2017 01:12:47 +0000 (21:12 -0400)
src/librustc_mir/util/pretty.rs

index 14f277d1767bbc3faf3915ddec606226c46d6327..eaba573dcd2e582d21dfdc056e87ba601d820e94 100644 (file)
@@ -324,7 +324,9 @@ fn write_mir_sig(tcx: TyCtxt, src: MirSource, mir: &Mir, w: &mut Write)
         MirSource::Promoted(_, i) => write!(w, "{:?} in", i)?
     }
 
-    write!(w, " {}", tcx.node_path_str(src.item_id()))?;
+    item_path::with_forced_impl_filename_line(|| { // see notes on #41697 elsewhere
+        write!(w, " {}", tcx.node_path_str(src.item_id()))
+    })?;
 
     if let MirSource::Fn(_) = src {
         write!(w, "(")?;