Give helpful suggestions for code containing {integer} and other non-concrete types #97677
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 initial code: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=37a16d044452d822d2e20198fe11f2bc
The output of this code is acceptable and helpful.
Ideally the compiler would suggest
Output = N
instead ofOutput = {integer}
, and infer that from the function body, i guess? I don't know, really, and it's not the main point of this issueThe problem is with the code that is suggested, which if copied verbatim, looks like this: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=304fea0cb18adf21f14c2d39a327b652
And for this code, the current output is:
Ideally the output should look like:
Ideally, this help message should also appear if a constant
{integer}
does exist but causes an error.The text was updated successfully, but these errors were encountered: