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

fix(lints): Fail when overriding inherited lints #12584

Merged
merged 4 commits into from Aug 29, 2023
Merged

Conversation

epage
Copy link
Contributor

@epage epage commented Aug 29, 2023

What does this PR try to resolve?

Overriding of inherited lints was reserved for the future but as pointed out in #12115 (comment), we aren't failing on these when we should but silently ignoring the overrides.

This turns it into a hard error.

In fixing this, I had to add a #[serde(expecting)] attribute to maintain behavior on an error case (otherwise it would say "expecting struct WorkspaceLints"). Since this drew the error message to my attention, I also tweaked it to make it more specific.

How should we test and review this PR?

Commits are broken down by the relevant tests and fixes to make the intended behavior changes obvious.

@rustbot
Copy link
Collaborator

rustbot commented Aug 29, 2023

r? @weihanglo

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-manifest Area: Cargo.toml issues S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 29, 2023
@epage epage force-pushed the lints branch 3 times, most recently from 0ae794b to 6568e2c Compare August 29, 2023 15:18
@arlosi
Copy link
Contributor

arlosi commented Aug 29, 2023

Thanks!

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 29, 2023

📌 Commit 6568e2c has been approved by arlosi

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-review Status: Awaiting review from the assignee but also interested parties. labels Aug 29, 2023
@bors
Copy link
Collaborator

bors commented Aug 29, 2023

⌛ Testing commit 6568e2c with merge 96fe1c9...

@bors
Copy link
Collaborator

bors commented Aug 29, 2023

☀️ Test successful - checks-actions
Approved by: arlosi
Pushing 96fe1c9 to master...

@bors bors merged commit 96fe1c9 into rust-lang:master Aug 29, 2023
19 checks passed
@epage epage deleted the lints branch August 29, 2023 21:31
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 29, 2023
Update cargo

18 commits in 925280f028db3a322935e040719a0754703947cf..96fe1c9e1aecd8f57063e3753969bb6418fd2fd5
2023-08-25 21:16:44 +0000 to 2023-08-29 20:10:34 +0000
- fix(lints): Fail when overriding inherited lints (rust-lang/cargo#12584)
- cargo install: suggest --git when package name is url (rust-lang/cargo#12575)
- chore: remove unstable-options for logout (rust-lang/cargo#12588)
- Improve logout message for asymmetric tokens (rust-lang/cargo#12587)
- fix(update): Remove references to -p in help (rust-lang/cargo#12586)
- fix(update): Make `-p` more convenient by being positional (rust-lang/cargo#12545)
- Set tracing target for networking messages. (rust-lang/cargo#12582)
- Retry docs (rust-lang/cargo#12583)
- feat(resolver): **Very** preliminary MSRV resolver support (rust-lang/cargo#12560)
- Update git2 (rust-lang/cargo#12580)
- Explain how `version` works for `git` dependencies (rust-lang/cargo#12270)
- Improve deserialization errors of untagged enums (rust-lang/cargo#12574)
- Add support for `target.'cfg(..)'.linker` (rust-lang/cargo#12535)
- Improve resolver version mismatch warning (rust-lang/cargo#12573)
- Stabilize `--keep-going` (rust-lang/cargo#12568)
- Define {{command}} for use in src/doc/man/includes (rust-lang/cargo#12570)
- Update serde (rust-lang/cargo#12569)
- chore: add missing `windows-sys` features back (rust-lang/cargo#12563)

r? ghost
@ehuss ehuss added this to the 1.74.0 milestone Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-manifest Area: Cargo.toml issues S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants