about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorTyler Mandry <tmandry@gmail.com>2020-09-09 21:02:35 -0700
committerGitHub <noreply@github.com>2020-09-09 21:02:35 -0700
commitba6e2b3a31c3f63db69880b8d74eae3faf73947d (patch)
tree6370e3146b4c3a47804c99969a498eb69a00d504 /src
parentd013e60ad479e086aae044a2e613510976bcb261 (diff)
parentf7aee330c70ef787d2224adb49804343978dd145 (diff)
downloadrust-ba6e2b3a31c3f63db69880b8d74eae3faf73947d.tar.gz
rust-ba6e2b3a31c3f63db69880b8d74eae3faf73947d.zip
Rollup merge of #76500 - richkadel:mir-graphviz-dark, r=tmandry
Add -Zgraphviz_dark_mode and monospace font fix

Many developers use a dark theme with editors and IDEs, but this
typically doesn't extend to graphviz output.

When I bring up a MIR graphviz document, the white background is
strikingly bright. This new option changes the colors used for graphviz
output to work better in dark-themed UIs.

<img width="1305" alt="Screen Shot 2020-09-09 at 3 00 31 PM" src="https://user-images.githubusercontent.com/3827298/92659478-4b9bff00-f2ad-11ea-8894-b40d3a873cb9.png">

Also fixed the monospace font for common graphviz renders (e.g., VS Code extensions), as described in https://github.com/rust-lang/rust/pull/76500#issuecomment-689837948

**Before:**
<img width="943" alt="Screen Shot 2020-09-09 at 2 48 44 PM" src="https://user-images.githubusercontent.com/3827298/92658939-47231680-f2ac-11ea-97ac-96727e4dd622.png">

**Now with fix:**
<img width="943" alt="Screen Shot 2020-09-09 at 2 49 02 PM" src="https://user-images.githubusercontent.com/3827298/92658959-51451500-f2ac-11ea-9aae-de982d466d6a.png">
Diffstat (limited to 'src')
-rw-r--r--src/test/mir-opt/graphviz.main.mir_map.0.dot6
1 files changed, 3 insertions, 3 deletions
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 f5d8b84812a..df4f11f0f21 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="monospace"];
-    node [fontname="monospace"];
-    edge [fontname="monospace"];
+    graph [fontname="Courier, monospace"];
+    node [fontname="Courier, monospace"];
+    edge [fontname="Courier, monospace"];
     label=<fn main() -&gt; ()<br align="left"/>>;
     bb0__0_3 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">0</td></tr><tr><td align="left" balign="left">_0 = const ()<br/></td></tr><tr><td align="left">goto</td></tr></table>>];
     bb1__0_3 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">1</td></tr><tr><td align="left">resume</td></tr></table>>];