Skip to content

missing_unsafe_on_extern: Set MSRV to 1.82#159159

Closed
joshtriplett wants to merge 1 commit into
rust-lang:mainfrom
joshtriplett:msrv-missing-unsafe-on-extern
Closed

missing_unsafe_on_extern: Set MSRV to 1.82#159159
joshtriplett wants to merge 1 commit into
rust-lang:mainfrom
joshtriplett:msrv-missing-unsafe-on-extern

Conversation

@joshtriplett

Copy link
Copy Markdown
Member

unsafe extern blocks were stabilized in 1.82:
#127921

`unsafe extern` blocks were stabilized in 1.82:
rust-lang#127921
@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. labels Jul 12, 2026
@rustbot

rustbot commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

r? @hanna-kruppe

rustbot has assigned @hanna-kruppe.
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 75 candidates
  • Random selection from 17 candidates

@hanna-kruppe

Copy link
Copy Markdown
Contributor

I don't understand the purpose of this and #159158 and #159156. These lints are edition 2024 migration lints, and allow-by-default in earlier editions. So they're already not shown to projects with MSRV <= 1.82 unless they explicitly opt into them, and if they opt in then it seems confusing to not show the lints they explicitly asked for.

Since these lints are unactionable without bumping MSRV to 1.82+, one could argue that it's a user error to enable them in a package with lower MSRV. But if someone's serious about upholding their MSRV, they should check it in CI, and that'll highlight the mistake immediately. Not showing the the lint when asked for trades an immediate nasty surprise (MSRV break) for another nasty surprise at a later time (when you flip the switch on the edition, you get errors that the migration lints were supposed to tell you about beforehand).

@joshtriplett

Copy link
Copy Markdown
Member Author

@hanna-kruppe Fair enough. I was looking to add usage of the new lint MSRV mechanism, looked for lints that get people to use features that only make sense with a new MSRV, and didn't think about the contradiction that implies for edition migration lints since you can't use the edition itself without bumping your MSRV.

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 12, 2026
@joshtriplett joshtriplett deleted the msrv-missing-unsafe-on-extern branch July 12, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants