diff options
| author | Vishnunarayan K I <appukuttancr@gmail.com> | 2020-11-12 13:17:43 +0530 |
|---|---|---|
| committer | Vishnunarayan K I <appukuttancr@gmail.com> | 2020-11-12 13:17:43 +0530 |
| commit | 51ecb96252bbce159e70617da611017afb30eba8 (patch) | |
| tree | ef3e8548d9f309aa4b5706e9aed86b9b557da4ff | |
| parent | 86a7831f0b522e624574b440bc09b40a713dacbb (diff) | |
| download | rust-51ecb96252bbce159e70617da611017afb30eba8.tar.gz rust-51ecb96252bbce159e70617da611017afb30eba8.zip | |
add different color for cleanup nodes in dark mode
| -rw-r--r-- | compiler/rustc_mir/src/util/generic_graph.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_mir/src/util/generic_graph.rs b/compiler/rustc_mir/src/util/generic_graph.rs index acaca435aa1..6ce305a4821 100644 --- a/compiler/rustc_mir/src/util/generic_graph.rs +++ b/compiler/rustc_mir/src/util/generic_graph.rs @@ -41,7 +41,8 @@ fn bb_to_graph_node(block: BasicBlock, body: &Body<'_>, dark_mode: bool) -> Node let label = node(def_id, block); let (title, bgcolor) = if data.is_cleanup { - (format!("{} (cleanup)", block.index()), "lightblue") + let color = if dark_mode { "royalblue" } else { "lightblue" }; + (format!("{} (cleanup)", block.index()), color) } else { let color = if dark_mode { "dimgray" } else { "gray" }; (format!("{}", block.index()), color) |
