"~const` is not allowed here" is a sub-optimal error message in one case #90052
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
F-const_trait_impl
`#![feature(const_trait_impl)]`
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I think this is a small diagnostic problem. This code compiles (with two warnings):
(There in the impl foo I've used both HasBar and ~const HasBar, I'm not sure if this is necessary).
If you miss the 'const' from the impl foo:
It gives an error that doesn't suggest that a 'const' is missing in foo:
The text was updated successfully, but these errors were encountered: