Box::new
recommended in struct initialization identifier position
#139631
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
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.
Code
Current output
Desired output
Rationale and extra context
I'm not quite sure whether this is desired this way but following the recommendation and putting
X { Box::new(a) }
in the code doesn't suggest adding thea
, that's why I thought reporting this may be useful.Other cases
Rust Version
Anything else?
No response
The text was updated successfully, but these errors were encountered: