Make unsafe_op_in_unsafe_fn
auto-migrated in 2024 edition
#119823
Labels
A-edition-2024
Area: The 2024 edition
A-lint
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-bug
Category: This is a bug.
E-help-wanted
Call for participation: Help is requested to fix this issue.
F-unsafe-block-in-unsafe-fn
RFC #2585
There are two things to do:
Applicability
toMachineApplicable
.FutureIncompatibilityReason::EditionError
orFutureIncompatibilityReason::EditionSemanticsChange
can do that. It sounds like that is not what you want to do (make it a hard error), so there will need to be new code to handle this scenario.That's not the only reason for future-incompatible lints. There are different categories, such as warning in dependencies (for soundness fixes), and for edition migrations (which don't warn in dependencies, only in the
cargo fix --edition
automatic migration). I opened #117927 to try to document it a little more clearly.Unfortunately the current system doesn't support the use case it sounds like you want (where it is only a warning in the new edition). It should be a relatively simple case of introducing something that will add the lint to the
rust-2024-compatibility
lint group.Yea, that's the problem I'm trying to bring up. This lint currently is not in the
rust-2024-compatibility
lint group which is required for handling that.Originally posted by @ehuss in #112038 (comment)
The text was updated successfully, but these errors were encountered: