Introduce -Z lint-rust-version#157707
Open
clubby789 wants to merge 3 commits into
Open
Conversation
Collaborator
|
|
Collaborator
|
rustbot has assigned @JonathanBrouwer. Use Why was this reviewer chosen?The reviewer was selected based on:
|
9f3b9de to
3548372
Compare
This was referenced Jun 10, 2026
Open
JonathanBrouwer
requested changes
Jun 14, 2026
| // omit self.sort_span | ||
| &self.is_lint, | ||
| // omit self.emitted_at | ||
| // omit self.rust_version |
Contributor
There was a problem hiding this comment.
This would mean that two diagnostics which are identical other than rust_version are considered equal for incremental, which I don't think is correct
| /// we print where in rustc this error was emitted. | ||
| pub emitted_at: DiagLocation, | ||
| /// Used to avoid lints which would affect MSRV | ||
| pub rust_version: Option<RustcVersion>, |
Contributor
There was a problem hiding this comment.
Hmmm I'm not a big fan of this being part of the DiagInner struct, to me it makes more sense to be declared on a rustc_lint_defs::Lint. Could you motivate why this needs to be here?
Collaborator
|
Reminder, once the PR becomes ready for a review, use |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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