Wrong error message when attempting to use a trait method's result as array length #48701
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The following code came up on IRC. It cannot ever work, but the error message is completely wrong (playground):
outputs:
This error messages is 100% wrong:
F
does implement the traitFoo
since the function signature does require it.The text was updated successfully, but these errors were encountered: