Diagnostics: bad suggestion when I have wrong parentheses around a dyn trait pointer type #114797
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
D-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
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.
This code
produces the following error
First of all, "braces" is the wrong word here I think, AFAIK "braces" means
{...}
, but here we have parentheses.More importantly though, if I apply the suggestion, the code still does not build! Instead it now shows a different error:
The correct syntax is to write
*mut (dyn Trait + Send)
.The text was updated successfully, but these errors were encountered: