Description
There are two things to do:
- Change the
Applicability
toMachineApplicable
. - Implement a system to add the lint to the rust-2024-compatibility lint group. Currently only
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.
Though I don't think that all edition lints ought to be marked future-incompatible (based on what I understand that designation to mean: you get lints for all your dependencies too).
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.
As I recall, in previous editions we've had a "run this lint group through fix to prepare for the edition" that this would be included in,
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)