Skip to content

Introduce -Z lint-rust-version#157707

Merged
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
clubby789:lint-rust-version
Jun 16, 2026
Merged

Introduce -Z lint-rust-version#157707
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
clubby789:lint-rust-version

Conversation

@clubby789

@clubby789 clubby789 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

View all comments

Implements rust-lang/compiler-team#950 by adding the unstable flag and updating the lint machinery to accept an MSRV.

Copies most of the approach from #149870

Tracking issue: #157574

@clubby789 clubby789 added A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 10, 2026
@rustbot

rustbot commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

rustc_macros::diagnostics was changed

cc @TaKO8Ki, @JonathanBrouwer

@rustbot rustbot added A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 10, 2026
@rustbot

rustbot commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

r? @JonathanBrouwer

rustbot has assigned @JonathanBrouwer.
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 73 candidates
  • Random selection from 18 candidates

Comment thread compiler/rustc_errors/src/diagnostic.rs Outdated
Comment thread compiler/rustc_errors/src/diagnostic.rs Outdated
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 14, 2026
@rustbot

rustbot commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rustbot rustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jun 14, 2026
@clubby789 clubby789 force-pushed the lint-rust-version branch from 3548372 to 593616e Compare June 15, 2026 11:57
@rustbot

rustbot commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann, @JonathanBrouwer

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@rustbot rustbot added the A-attributes Area: Attributes (`#[…]`, `#![…]`) label Jun 15, 2026
@clubby789 clubby789 force-pushed the lint-rust-version branch from 593616e to ca98ee8 Compare June 15, 2026 12:02
@rustbot

rustbot commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

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.

@clubby789

Copy link
Copy Markdown
Contributor Author

Added the motivating lint to demonstrate/test the API. If the approach looks good I will split that one out to a new PR.

@rust-log-analyzer

This comment has been minimized.

@clubby789 clubby789 force-pushed the lint-rust-version branch from ca98ee8 to b92d944 Compare June 15, 2026 15:35
@rust-log-analyzer

This comment has been minimized.

@clubby789 clubby789 force-pushed the lint-rust-version branch from b92d944 to 2d0d591 Compare June 15, 2026 16:13
@rust-log-analyzer

This comment has been minimized.

@clubby789 clubby789 force-pushed the lint-rust-version branch from 2d0d591 to baf816a Compare June 15, 2026 17:31
@rustbot rustbot added the O-windows Operating system: Windows label Jun 15, 2026
@clubby789 clubby789 removed the O-windows Operating system: Windows label Jun 15, 2026
@clubby789

Copy link
Copy Markdown
Contributor Author

@rustbot ready
The final commit will take some more time to get working in CI but that shouldn't be considered part of this PR proper 😅

@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 Jun 15, 2026
@rust-log-analyzer

This comment has been minimized.

@JonathanBrouwer JonathanBrouwer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approach looks good now, thanks for adding the 3rd commit as that helped with reviewing.

Could you remove the 3rd commit and get CI green? Then I'll take one more look and approve

View changes since this review

Comment thread compiler/rustc_lint_defs/src/lib.rs
@rustbot rustbot 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 Jun 15, 2026
@clubby789 clubby789 force-pushed the lint-rust-version branch from baf816a to 68f4e76 Compare June 15, 2026 19:37
@clubby789

Copy link
Copy Markdown
Contributor Author

Dropped the commit with the lint, @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 Jun 15, 2026

@JonathanBrouwer JonathanBrouwer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

r=me with green ci

View changes since this review

@clubby789

Copy link
Copy Markdown
Contributor Author

@bors r=JonathanBrouwer

@rust-bors

rust-bors Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 68f4e76 has been approved by JonathanBrouwer

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 Jun 15, 2026
rust-bors Bot pushed a commit that referenced this pull request Jun 16, 2026
Rollup of 6 pull requests

Successful merges:

 - #157707 (Introduce `-Z lint-rust-version`)
 - #157748 (rustc_public: make sure hidden fields have their accessors)
 - #157831 (test `carryless_mul` codegen)
 - #157879 (bootstrap: fix inverted success check in PowerShell download fallback)
 - #157933 (Use constant for detecting thin pointer formatting)
 - #157934 (update AttributeTemplate docs)
@rust-bors rust-bors Bot merged commit f715000 into rust-lang:main Jun 16, 2026
13 checks passed
@rustbot rustbot added this to the 1.98.0 milestone Jun 16, 2026
rust-timer added a commit that referenced this pull request Jun 16, 2026
Rollup merge of #157707 - clubby789:lint-rust-version, r=JonathanBrouwer

Introduce `-Z lint-rust-version`

Implements rust-lang/compiler-team#950 by adding the unstable flag and updating the lint machinery to accept an MSRV.

Copies most of the approach from #149870

Tracking issue: #157574
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 16, 2026
…=JonathanBrouwer

doc: Document `-Zlint-rust-version`

Followup to rust-lang#157707
Tracking issue: rust-lang#157574

r? JonathanBrouwer
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 16, 2026
…=JonathanBrouwer

doc: Document `-Zlint-rust-version`

Followup to rust-lang#157707
Tracking issue: rust-lang#157574

r? JonathanBrouwer
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 16, 2026
…=JonathanBrouwer

doc: Document `-Zlint-rust-version`

Followup to rust-lang#157707
Tracking issue: rust-lang#157574

r? JonathanBrouwer
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 16, 2026
…=JonathanBrouwer

doc: Document `-Zlint-rust-version`

Followup to rust-lang#157707
Tracking issue: rust-lang#157574

r? JonathanBrouwer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-diagnostics Area: Messages for errors, warnings, and lints A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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