const Mutex<T> never makes sense, and therefore should raise a warning (or an error) #104031
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.
Given the following code:
The current output is:
The const expression causes every site to have their own
Mutex<T>
, which never makes any sense. Imho this should raise a warning, or even an error.The text was updated successfully, but these errors were encountered: