Auto merge of #109954 - clubby789:graphviz-path-trimming, r=compiler-errors

Disable path trimming during graphviz output

Fixes #109943

We can end up pretty-printing a path for the graphviz file without emitting a diagnostic, so disable path trimming at this point.
This commit is contained in:
bors
2023-04-05 05:47:33 +00:00
@@ -15,6 +15,7 @@
use rustc_index::vec::{Idx, IndexVec};
use rustc_middle::mir::{self, traversal, BasicBlock};
use rustc_middle::mir::{create_dump_file, dump_enabled};
use rustc_middle::ty::print::with_no_trimmed_paths;
use rustc_middle::ty::TyCtxt;
use rustc_span::symbol::{sym, Symbol};
@@ -285,7 +286,7 @@ fn write_graphviz_results<'tcx, A>(
if tcx.sess.opts.unstable_opts.graphviz_dark_mode {
render_opts.push(dot::RenderOption::DarkTheme);
}
dot::render_opts(&graphviz, &mut buf, &render_opts)?;
with_no_trimmed_paths!(dot::render_opts(&graphviz, &mut buf, &render_opts)?);
file.write_all(&buf)?;