Skip to content

Split ColorConfig off of HumanReadableErrorType - #128806

Merged
bors merged 2 commits into
rust-lang:masterfrom
estebank:color-config
Aug 9, 2024
Merged

Split ColorConfig off of HumanReadableErrorType#128806
bors merged 2 commits into
rust-lang:masterfrom
estebank:color-config

Conversation

@estebank

Copy link
Copy Markdown
Contributor

The previous setup tied two unrelated things together. Splitting these two is a better model.

Identified by https://github.com/rust-lang/rust/pull/126597/files#r1667800754

@rustbot

Copy link
Copy Markdown
Collaborator

r? @lcnr

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

@rustbotrustbot 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Aug 8, 2024
@rust-log-analyzer

This comment has been minimized.

@estebank
estebankforce-pushed the color-config branch 2 times, most recently from 3966c54 to 9ee3a14CompareAugust 8, 2024 02:48
@rust-log-analyzer

This comment has been minimized.

@jieyouxu

Copy link
Copy Markdown
Member

r? jieyouxu

@rustbotrustbot assigned jieyouxu and unassigned lcnrAug 8, 2024

@jieyouxujieyouxu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good cleanup! Just a typo and a tiny nit, feel free to r=me afterwards.

config::ErrorOutputType::HumanReadable(kind) => {
let (short, color_config) = kind.unzip();
config::ErrorOutputType::HumanReadable(kind, color_config) => {
let short = matches!(kind, HumanReadableErrorType::Short);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: very tiny nit: this matches!(kind, HumanReadableErrorType::Short) is repeated in quite a few places. Since HumanReadableErrorType derives PartialEq, this could just be

kind == HumanReadableErrorType::Short

or maybe if we want the usage site to look like kind.short()

implHumanReadableErrorType{fnshort(self) -> bool{self == HumanReadableErrorType::Short}}

Comment threadcompiler/rustc_interface/src/tests.rs Outdated
@jieyouxujieyouxu added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 8, 2024
The previous setup tied two unrelated things together. Splitting these two is a better model.
@estebank
estebankforce-pushed the color-config branch 2 times, most recently from 1a0c155 to 4447880CompareAugust 8, 2024 14:44
@rust-log-analyzer

This comment has been minimized.

@estebank

Copy link
Copy Markdown
ContributorAuthor

@bors r=jieyouxu

@bors

bors commented Aug 8, 2024

Copy link
Copy Markdown
Collaborator

📌 Commit 95c1c34 has been approved by jieyouxu

It is now in the queue for this repository.

@borsbors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 8, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 8, 2024
Split `ColorConfig` off of `HumanReadableErrorType`
The previous setup tied two unrelated things together. Splitting these two is a better model.
Identified by https://github.com/rust-lang/rust/pull/126597/files#r1667800754
This was referenced Aug 8, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 9, 2024
…iaskrgr
Rollup of 8 pull requests
Successful merges:
- rust-lang#128640 (rwlock: disable 'frob' test in Miri on macOS)
- rust-lang#128791 (Don't implement `AsyncFn` for `FnDef`/`FnPtr` that wouldnt implement `Fn`)
- rust-lang#128806 (Split `ColorConfig` off of `HumanReadableErrorType`)
- rust-lang#128818 (std float tests: special-case Miri in feature detection)
- rust-lang#128834 (rustdoc: strip unreachable modules)
- rust-lang#128836 (rustdoc-json: add a test for impls on private & hidden types)
- rust-lang#128837 (Clippy subtree update)
- rust-lang#128851 (Add comment that bors did not see pushed before it merged)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit f106496 into rust-lang:masterAug 9, 2024
@rustbotrustbot added this to the 1.82.0 milestone Aug 9, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Aug 9, 2024
Rollup merge of rust-lang#128806 - estebank:color-config, r=jieyouxu
Split `ColorConfig` off of `HumanReadableErrorType`
The previous setup tied two unrelated things together. Splitting these two is a better model.
Identified by https://github.com/rust-lang/rust/pull/126597/files#r1667800754
github-merge-queueBot pushed a commit to model-checking/kani that referenced this pull request Aug 28, 2024
Upgrades toolchain to 08/28
Culprit upstream changes:
1. rust-lang/rust#128812
2. rust-lang/rust#128703
3. rust-lang/rust#127679
4. rust-lang/rust-clippy#12993
5. rust-lang/cargo#14370
6. rust-lang/rust#128806Resolves#3429
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@estebank@rustbot@rust-log-analyzer@jieyouxu@bors@lcnr