missing_unsafe_on_extern: Set MSRV to 1.82#159159
Conversation
`unsafe extern` blocks were stabilized in 1.82: rust-lang#127921
|
rustbot has assigned @hanna-kruppe. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
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). |
|
@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. |
unsafe externblocks were stabilized in 1.82:#127921