In edition 2024 error message "error: creating a shared reference to mutable static is discouraged" is wrong #139952
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-edition-2024
Area: The 2024 edition
D-papercut
Diagnostics: An error or lint that needs small tweaks.
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
Edition 2021 warning "warning: creating a shared reference to mutable static is discouraged" has become edition 2024 error "error: creating a shared reference to mutable static is discouraged", which is wrong.
That behaviour is no longer discouraged but it is now not allowed.
Other cases
Rust Version
Anything else?
No response
The text was updated successfully, but these errors were encountered: