Skip to content

Conversation

@epage
Copy link
Contributor

@epage epage commented Oct 16, 2025

What does this PR try to resolve?

On its own, this does nothing. These styles aren't used anywhere else and so this doesn't increase re-use.

My primary goal with this is having a central place to document this for other applications to track that want to mirror our style. In particular, I'm hoping to take advantage of the UPDATE colors in rustup.

This also makes it easier for us to audit all of the values for consistency.

How to test and review this PR?

@rustbot rustbot added Command-tree Command-update S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 16, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 16, 2025

r? @ehuss

rustbot has assigned @ehuss.
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

pub const UPDATE_DOWNGRADED: Style = WARN;
pub const UPDATE_UNCHANGED: Style = anstyle::Style::new().bold();

pub const DEP_NORMAL: Style = anstyle::Style::new().effects(anstyle::Effects::DIMMED);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My primary goal with this is having a central place to document this for other applications

Do you mean we'll have doc comments for each, or code itself is self-documented?

Ask because I don't think the variable names here describe the intent clear if not looking into the implementation

But anyway, having styles in one place is great.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean we'll have doc comments for each, or code itself is self-documented?

Not quite either. I more care about having this specified in a central location to copy/paste from. annotate-snippets makes that copy/pasting more complex but oh well.

@weihanglo weihanglo added this pull request to the merge queue Oct 16, 2025
Merged via the queue into rust-lang:master with commit d80156f Oct 16, 2025
25 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 16, 2025
@epage epage deleted the style branch October 16, 2025 17:47
epage added a commit to epage/cargo that referenced this pull request Oct 21, 2025
This is similar to rust-lang#16124 in making it easier for others to see what
styles cargo uses and copy them.
github-merge-queue bot pushed a commit that referenced this pull request Oct 21, 2025
### What does this PR try to resolve?

This is similar to #16124 in making it easier for others to see what
styles cargo uses and copy them.

### How to test and review this PR?
bors added a commit to rust-lang/rust that referenced this pull request Oct 22, 2025
Update cargo submodule

7 commits in 367fd9f213750cd40317803dd0a5a3ce3f0c676d..344c4567c634a25837e3c3476aac08af84cf9203
2025-10-15 15:01:32 +0000 to 2025-10-21 21:29:43 +0000
- refactor: Centralize CONTEXT style (rust-lang/cargo#16135)
- chore(triagebot): `A-json-output` for machine_message.rs (rust-lang/cargo#16133)
- refactor: JSON message with less allocations (rust-lang/cargo#16130)
- More warning conversions (rust-lang/cargo#16126)
- fix(check): Fix suggested command for bin package (rust-lang/cargo#16127)
- fix(script): Remove name sanitiztion outside what is strictly required (rust-lang/cargo#16120)
- refactor: Centralize some more styling (rust-lang/cargo#16124)

r? ghost
@rustbot rustbot added this to the 1.92.0 milestone Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants