Future compatibility lints are worded too strongly #120887
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
Rationale and extra context
Future compatibility lints assert that the linted code will become a hard error in the future. However, not all future compatibility lints become hard errors. The two-phase borrow compatibility lint is one example that never became a hard error. As far as I know, it is still the plan that the provided example remains supported as well. And I've seen other cases as well.
The assertion that the code will definitely become a hard error can be problematic if people rely on it for new compile/language development, or if they rely on it when reasoning about making their
unsafe
code sound. It's also just plain annoying to find out the compiler is telling you and everyone else something which isn't true.The specific future compatibility lint from my code example is just an example; all such lints share the "it will become a hard error" verbiage.
Other cases
No response
Rust Version
Anything else?
No response
The text was updated successfully, but these errors were encountered: