Skip to content

Change color usage for highlights - #165068

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
rperier:highlights_color
Nov 13, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
rperier:highlights_color

Conversation

@rperier

@rperier rperier commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

fixes #164877

Currently, we use magenta for highlighting parts of messages: associated-types, some symbols, etc. Switch to BrightCyan, it is the color already used to highlight the help messages, it is also more consistent with the other colors and more visible. The BrightCyan is also more visible on terminal compared to a normal Cyan.

For now, I have only tested on a Linux host (no windows machines). I am open to suggestions and able to do further tests if necessary, np.

cc @estebank

No LLM, entirely written and tested by myself.

@rustbot

rustbot commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

rustc_errors::emitter was changed

cc @Muscraft

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 28, 2026
@rustbot

rustbot commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

r? @mu001999

rustbot has assigned @mu001999.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 77 candidates
  • Random selection from 20 candidates

@mu001999

Copy link
Copy Markdown
Member

r? estebank

@rustbot rustbot assigned estebank and unassigned mu001999 Oct 28, 2026
@estebank

Copy link
Copy Markdown
Contributor

We need to confirm what the output is on Windows (both for cmd.exe and Windows Terminal, there's likely a stray svg that targets windows as well that will need to be fixed before CI will accept the PR), and confirm what the default looks like on different terminal default color schemes (both dark and bright backgrounds). Preliminarily, the svg changes look good to me. Announcing the change on Zulip so that more people are aware of it, in case we can get early feedback: https://rust-lang.zulipchat.com/#narrow/channel/147480-t-compiler.2Fdiagnostics/topic/Changing.20highlighting.20color/with/635755949

@rustbot

This comment has been minimized.

@rperier

rperier commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor Author

I have tested on a windows 11 vm and updated the corresponding tests. I have tested the color on the 'Bash Git' terminal (dark), Powershell in dark and light mode and the cmd terminal. The new highlight color looks good in dark and light mode, it is not worst than the help message that was already in BrightCyan.

@rust-bors

This comment has been minimized.

@estebank

Copy link
Copy Markdown
Contributor

R=me after rebase

Currently, we use magenta for highlighting parts of messages: associated-types,
some symbols, etc. Switch to BrightCyan, it is the color already used to
highlight the help messages, it is also more consistent with the other
colors and more visible.
@estebank

Copy link
Copy Markdown
Contributor

Note that a recently merged change made it so we no longer special case the Windows output, so that .windows.svg file will go away.

@rustbot

rustbot commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@estebank

Copy link
Copy Markdown
Contributor

@bors r+

@rust-bors

rust-bors Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 063cf4c has been approved by estebank

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 13, 2026
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 13, 2026
Change color usage for highlights

fixes rust-lang#164877

Currently, we use magenta for highlighting parts of messages: associated-types, some symbols, etc. Switch to BrightCyan, it is the color already used to highlight the help messages, it is also more consistent with the other colors and more visible. The BrightCyan is also more visible on terminal compared to a normal Cyan.

For now, I have only tested on a Linux host (no windows machines). I am open to suggestions and able to do further tests if necessary, np.

cc @estebank

No LLM, entirely written and tested by myself.
rust-bors Bot pushed a commit that referenced this pull request Nov 13, 2026
Rollup of 13 pull requests

Successful merges:

 - #164707 (Re-enable rustc profile generation for static linked llvm on Windows x64 builds )
 - #165068 (Change color usage for highlights)
 - #165841 (Tell Miri about the alignment handling in the Windows System allocator)
 - #165880 (Remove dead code for returning `BackendRepr::Memory` with `PassMode::Direct`)
 - #164108 (Add unstable `-Zllvm-tpde` flag to `rustc_codegen_llvm`)
 - #165565 (view-types: lower view types from HIR)
 - #165622 (small cleanups in rustc_codegen_llvm)
 - #165771 (tests: cover MSVC ThinLTO exported symbol preservation)
 - #165810 (reflection: reflect attributes from adts, fields, and variants)
 - #165823 (Tweak crate error wording and turn them into fatal errors)
 - #165849 (More opt-dist improvements)
 - #165855 (Update `sysinfo` version to `0.40.3`)
 - #165872 (Some attribute related cleanups)

Failed merges:

 - #165861 (cg_llvm: Use an invariant lifetime brand for LLVM attributes)
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 13, 2026
Change color usage for highlights

fixes rust-lang#164877

Currently, we use magenta for highlighting parts of messages: associated-types, some symbols, etc. Switch to BrightCyan, it is the color already used to highlight the help messages, it is also more consistent with the other colors and more visible. The BrightCyan is also more visible on terminal compared to a normal Cyan.

For now, I have only tested on a Linux host (no windows machines). I am open to suggestions and able to do further tests if necessary, np.

cc @estebank

No LLM, entirely written and tested by myself.
rust-bors Bot pushed a commit that referenced this pull request Nov 13, 2026
Rollup of 11 pull requests

Successful merges:

 - #165068 (Change color usage for highlights)
 - #165841 (Tell Miri about the alignment handling in the Windows System allocator)
 - #165880 (Remove dead code for returning `BackendRepr::Memory` with `PassMode::Direct`)
 - #164108 (Add unstable `-Zllvm-tpde` flag to `rustc_codegen_llvm`)
 - #165565 (view-types: lower view types from HIR)
 - #165622 (small cleanups in rustc_codegen_llvm)
 - #165771 (tests: cover MSVC ThinLTO exported symbol preservation)
 - #165810 (reflection: reflect attributes from adts, fields, and variants)
 - #165849 (More opt-dist improvements)
 - #165855 (Update `sysinfo` version to `0.40.3`)
 - #165872 (Some attribute related cleanups)

Failed merges:

 - #165861 (cg_llvm: Use an invariant lifetime brand for LLVM attributes)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 13, 2026
Change color usage for highlights

fixes rust-lang#164877

Currently, we use magenta for highlighting parts of messages: associated-types, some symbols, etc. Switch to BrightCyan, it is the color already used to highlight the help messages, it is also more consistent with the other colors and more visible. The BrightCyan is also more visible on terminal compared to a normal Cyan.

For now, I have only tested on a Linux host (no windows machines). I am open to suggestions and able to do further tests if necessary, np.

cc @estebank

No LLM, entirely written and tested by myself.
rust-bors Bot pushed a commit that referenced this pull request Nov 13, 2026
…uwer

Rollup of 18 pull requests

Successful merges:

 - #164828 (When suggesting path of renamed crate, use the renamed name)
 - #164864 (Avoid hoisting uninitialized reads in EarlyOtherwiseBranch)
 - #165068 (Change color usage for highlights)
 - #165221 (Canonicalize more comparison operators)
 - #165841 (Tell Miri about the alignment handling in the Windows System allocator)
 - #165869 (Cleanup: Remove `path_matches` and `value_str` from `AttributeExt`)
 - #165880 (Remove dead code for returning `BackendRepr::Memory` with `PassMode::Direct`)
 - #164108 (Add unstable `-Zllvm-tpde` flag to `rustc_codegen_llvm`)
 - #165565 (view-types: lower view types from HIR)
 - #165622 (small cleanups in rustc_codegen_llvm)
 - #165745 (Don't ICE when a guard condition is a place of type `!`)
 - #165771 (tests: cover MSVC ThinLTO exported symbol preservation)
 - #165810 (reflection: reflect attributes from adts, fields, and variants)
 - #165823 (Tweak crate error wording and turn them into fatal errors)
 - #165849 (More opt-dist improvements)
 - #165855 (Update `sysinfo` version to `0.40.3`)
 - #165872 (Some attribute related cleanups)
 - #165905 (CI: Use a consistent locale when sorting docker build inputs)
rust-bors Bot pushed a commit that referenced this pull request Nov 13, 2026
…uwer

Rollup of 17 pull requests

Successful merges:

 - #164828 (When suggesting path of renamed crate, use the renamed name)
 - #164864 (Avoid hoisting uninitialized reads in EarlyOtherwiseBranch)
 - #165068 (Change color usage for highlights)
 - #165221 (Canonicalize more comparison operators)
 - #165841 (Tell Miri about the alignment handling in the Windows System allocator)
 - #165869 (Cleanup: Remove `path_matches` and `value_str` from `AttributeExt`)
 - #165880 (Remove dead code for returning `BackendRepr::Memory` with `PassMode::Direct`)
 - #164108 (Add unstable `-Zllvm-tpde` flag to `rustc_codegen_llvm`)
 - #165565 (view-types: lower view types from HIR)
 - #165622 (small cleanups in rustc_codegen_llvm)
 - #165771 (tests: cover MSVC ThinLTO exported symbol preservation)
 - #165810 (reflection: reflect attributes from adts, fields, and variants)
 - #165823 (Tweak crate error wording and turn them into fatal errors)
 - #165849 (More opt-dist improvements)
 - #165855 (Update `sysinfo` version to `0.40.3`)
 - #165872 (Some attribute related cleanups)
 - #165905 (CI: Use a consistent locale when sorting docker build inputs)
@rust-bors
rust-bors Bot merged commit a00477c into rust-lang:main Nov 13, 2026
14 checks passed
rust-bors Bot pushed a commit that referenced this pull request Nov 13, 2026
Rollup merge of #165068 - rperier:highlights_color, r=estebank

Change color usage for highlights

fixes #164877

Currently, we use magenta for highlighting parts of messages: associated-types, some symbols, etc. Switch to BrightCyan, it is the color already used to highlight the help messages, it is also more consistent with the other colors and more visible. The BrightCyan is also more visible on terminal compared to a normal Cyan.

For now, I have only tested on a Linux host (no windows machines). I am open to suggestions and able to do further tests if necessary, np.

cc @estebank

No LLM, entirely written and tested by myself.
@rustbot rustbot added this to the 1.102.0 milestone Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Diagnostics: Reconsider color usage for highlights

4 participants