Diagnostic says method is available for a type it is not, when using const generics #124946
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
D-incorrect
Diagnostics: A diagnostic that is giving misleading or incorrect information.
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
https://play.rust-lang.org/?version=stable&mode=release&edition=2021&gist=eefb7934c44344c05b333afcbe6c4739
Current output
Desired output
or
Rationale and extra context
The diagnostic says "method
build
is available onBuilder<false, false>
", which is not true; it is available onBuilder<true, true>
, though.The note does say that it is found for
Builder<true, true>
, though. This makes me wonder whether the former is even necessary or if it means something else that I do not understand (e.g., is there a difference between "is available on" and "was found for"?).Other cases
Rust Version
Anything else?
No response
The text was updated successfully, but these errors were encountered: