Offer a suggested fix for structs with a single field #138931
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.
Code
Current output
Desired output
Ideally rustc would offer a fix here of
Person { name: "Wilfred".to_owned() }
.Rationale and extra context
When there's only one field in a struct, this is probably what the user meant to write.
Rust Version
Anything else?
No response
The text was updated successfully, but these errors were encountered: