Skip to content

feat: show what lint was overruled#152452

Open
ShE3py wants to merge 1 commit intorust-lang:mainfrom
ShE3py:overruled-lint
Open

feat: show what lint was overruled#152452
ShE3py wants to merge 1 commit intorust-lang:mainfrom
ShE3py:overruled-lint

Conversation

@ShE3py
Copy link
Contributor

@ShE3py ShE3py commented Feb 10, 2026

We can't #[allow] a whole lint group if any of its members is forbidden, but the offending member is not currently shown if it was forbidden from the command line.

Before/after:

 $ rustc -F dead_code - <<< '#![allow(unused)]'
 error[E0453]: allow(unused) incompatible with previous forbid
  --> <anon>:1:10
   |
 1 | #![allow(unused)]
   |          ^^^^^^ overruled by previous forbid
   |
-  = note: `forbid` lint level was set on command line
+  = note: `forbid` lint level was set on command line (`-F dead_code`)
 
 error: aborting due to 1 previous error

@rustbot label +A-diagnostics +A-lints +D-terse

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 10, 2026
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Feb 10, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 10, 2026

r? @dianqk

rustbot has assigned @dianqk.
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 66 candidates
  • Random selection from 13 candidates

@rustbot rustbot added A-diagnostics Area: Messages for errors, warnings, and lints A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. D-terse Diagnostics: An error or lint that doesn't give enough information about the problem at hand. labels Feb 10, 2026
@rust-log-analyzer

This comment has been minimized.

Copy link
Member

@dianqk dianqk left a comment

Choose a reason for hiding this comment

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

@dianqk
Copy link
Member

dianqk commented Feb 10, 2026

I'm not familiar with this part, so someone would like to double-check it.
@rustbot reroll
@bors rollup

@rustbot rustbot assigned BoxyUwU and unassigned dianqk Feb 10, 2026
@BoxyUwU
Copy link
Member

BoxyUwU commented Feb 14, 2026

@bors r+

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 14, 2026

📌 Commit bb4cf63 has been approved by BoxyUwU

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 Feb 14, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 14, 2026
feat: show what lint was overruled

We can't `#[allow]` a whole lint group if any of its members is forbidden, but the offending member is not currently shown if it was forbidden from the command line.

Before/after:
```diff
 $ rustc -F dead_code - <<< '#![allow(unused)]'
 error[E0453]: allow(unused) incompatible with previous forbid
  --> <anon>:1:10
   |
 1 | #![allow(unused)]
   |          ^^^^^^ overruled by previous forbid
   |
-  = note: `forbid` lint level was set on command line
+  = note: `forbid` lint level was set on command line (`-F dead_code`)

 error: aborting due to 1 previous error
```

@rustbot label +A-diagnostics +A-lints +D-terse
@rust-bors rust-bors bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Feb 14, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors bot removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Feb 14, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 15, 2026

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.

@ShE3py
Copy link
Contributor Author

ShE3py commented Feb 15, 2026

Resolved conflicts.
@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 15, 2026
@BoxyUwU
Copy link
Member

BoxyUwU commented Feb 15, 2026

@bors r+

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 15, 2026

📌 Commit d129233 has been approved by BoxyUwU

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 Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-diagnostics Area: Messages for errors, warnings, and lints A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. D-terse Diagnostics: An error or lint that doesn't give enough information about the problem at hand. 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.

5 participants