Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split ColorConfig off of HumanReadableErrorType #128806

Merged
merged 2 commits into from
Aug 9, 2024

Conversation

estebank
Copy link
Contributor

@estebank estebank commented Aug 8, 2024

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
Collaborator

rustbot commented Aug 8, 2024

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

@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. 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 estebank force-pushed the color-config branch 2 times, most recently from 3966c54 to 9ee3a14 Compare August 8, 2024 02:48
@rust-log-analyzer

This comment has been minimized.

@jieyouxu
Copy link
Member

jieyouxu commented Aug 8, 2024

r? jieyouxu

@rustbot rustbot assigned jieyouxu and unassigned lcnr Aug 8, 2024
Copy link
Member

@jieyouxu jieyouxu left a comment

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
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()

impl HumanReadableErrorType {
    fn short(self) -> bool { self == HumanReadableErrorType::Short }
}

compiler/rustc_interface/src/tests.rs Outdated Show resolved Hide resolved
@jieyouxu jieyouxu 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 estebank force-pushed the color-config branch 2 times, most recently from 1a0c155 to 4447880 Compare August 8, 2024 14:44
@rust-log-analyzer

This comment has been minimized.

@estebank
Copy link
Contributor Author

estebank commented Aug 8, 2024

@bors r=jieyouxu

@bors
Copy link
Contributor

bors commented Aug 8, 2024

📌 Commit 95c1c34 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors 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
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:master Aug 9, 2024
6 checks passed
@rustbot rustbot 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-queue bot 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#128806

Resolves #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 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. T-rustdoc Relevant 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