-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Incorrect suggestion when type annotation on turbofished enum is needed #100137
Copy link
Copy link
Closed
Closed
Copy link
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsD-invalid-suggestionDiagnostics: A structured suggestion resulting in incorrect code.Diagnostics: A structured suggestion resulting in incorrect code.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsD-invalid-suggestionDiagnostics: A structured suggestion resulting in incorrect code.Diagnostics: A structured suggestion resulting in incorrect code.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Given the following code: https://play.rust-lang.org/?version=nightly&mode=release&edition=2021&gist=b9b341939839ec733bf081c5ddf86e5b
The current output is:
But applying this causes an error, saying that
Cdoesn't allow type arguments.This happens on nightly and beta, but not on stable. I'm assuming the "consider specifying the generic arguments" was added recently.
I don't think we need the help here, because the generic arguments are already specified.
@rustbot label +D-invalid-suggestion