about summary refs log tree commit diff
path: root/compiler/rustc_errors/src
diff options
context:
space:
mode:
authorjyn <github@jyn.dev>2023-12-08 14:09:10 -0500
committerjyn <github@jyn.dev>2023-12-08 14:30:48 -0500
commit96b027f35df93a0fe963c9825b39b248672e18fb (patch)
treeab31e4d515791d3e5e4a494adecd0b0a61bd9eb3 /compiler/rustc_errors/src
parent9f0c6f15ce32661e65034898155fcdaa8539201e (diff)
downloadrust-96b027f35df93a0fe963c9825b39b248672e18fb.tar.gz
rust-96b027f35df93a0fe963c9825b39b248672e18fb.zip
use magenta instead of bold for highlighting
according to a poll of gay people in my phone, purple is the most popular color to use for highlighting

| color      | percentage |
| ---------- | ---------- |
| bold white | 6%         |
| blue       | 14%        |
| cyan       | 26%        |
| purple     | 37%        |
| magenta    | 17%        |

unfortunately, purple is not supported by 16-color terminals, which rustc apparently wants to support for some reason.
until we require support for full 256-color terms (e.g. by doing the same feature detection as we currently do for urls), we can't use it.

instead, i have collapsed the purple votes into magenta on the theory that they're close, and also because magenta is pretty.
Diffstat (limited to 'compiler/rustc_errors/src')
-rw-r--r--compiler/rustc_errors/src/emitter.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs
index 62aa8e602af..3f257fdd9cf 100644
--- a/compiler/rustc_errors/src/emitter.rs
+++ b/compiler/rustc_errors/src/emitter.rs
@@ -2719,7 +2719,7 @@ impl Style {
                 spec.set_bold(true);
             }
             Style::Highlight => {
-                spec.set_bold(true);
+                spec.set_bold(true).set_fg(Some(Color::Magenta));
             }
         }
         spec