Wrong help
message for Vec::resize_with
calls that constrain the Vec
to a wrong type
#116155
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
D-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
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
The same
help
message is also shown for function calls and other cases which later lead to type errors, such as returningxs
from a function with return typeVec<usize>
.Present in 1.72.0 stable and
nightly-2023-09-24
:Other cases
No response
Anything else?
Godbolt link
The text was updated successfully, but these errors were encountered: