From d25e273ab3a93b5205921f226e61be11fd5f8cd7 Mon Sep 17 00:00:00 2001 From: Dylan MacKenzie Date: Tue, 15 Sep 2020 19:31:46 -0700 Subject: [PATCH] Don't force graphviz diagrams to render in Courier --- compiler/rustc_graphviz/src/lib.rs | 2 +- compiler/rustc_mir/src/util/graphviz.rs | 2 +- src/test/mir-opt/graphviz.main.mir_map.0.dot | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/rustc_graphviz/src/lib.rs b/compiler/rustc_graphviz/src/lib.rs index 29ec3572016d7..252e341686541 100644 --- a/compiler/rustc_graphviz/src/lib.rs +++ b/compiler/rustc_graphviz/src/lib.rs @@ -634,7 +634,7 @@ where let mut graph_attrs = Vec::new(); let mut content_attrs = Vec::new(); if options.contains(&RenderOption::Monospace) { - let font = r#"fontname="Courier, monospace""#; + let font = r#"fontname="monospace""#; graph_attrs.push(font); content_attrs.push(font); }; diff --git a/compiler/rustc_mir/src/util/graphviz.rs b/compiler/rustc_mir/src/util/graphviz.rs index e89c943770638..bc1e3fa8b2915 100644 --- a/compiler/rustc_mir/src/util/graphviz.rs +++ b/compiler/rustc_mir/src/util/graphviz.rs @@ -55,7 +55,7 @@ where writeln!(w, "{} {}Mir_{} {{", kind, cluster, def_name)?; // Global graph properties - let font = r#"fontname="Courier, monospace""#; + let font = r#"fontname="monospace""#; let mut graph_attrs = vec![font]; let mut content_attrs = vec![font]; diff --git a/src/test/mir-opt/graphviz.main.mir_map.0.dot b/src/test/mir-opt/graphviz.main.mir_map.0.dot index df4f11f0f2169..f5d8b84812a3e 100644 --- a/src/test/mir-opt/graphviz.main.mir_map.0.dot +++ b/src/test/mir-opt/graphviz.main.mir_map.0.dot @@ -1,7 +1,7 @@ digraph Mir_0_3 { - graph [fontname="Courier, monospace"]; - node [fontname="Courier, monospace"]; - edge [fontname="Courier, monospace"]; + graph [fontname="monospace"]; + node [fontname="monospace"]; + edge [fontname="monospace"]; label=>; bb0__0_3 [shape="none", label=<
0
_0 = const ()
goto
>]; bb1__0_3 [shape="none", label=<
1
resume
>];