Cannot use ..Default::default() with structs having private fields despite implementing a custom Default trait #134167
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
E-needs-investigation
Call for partcipation: This issues needs some investigation to determine current status
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
As you see, I've implemented the Default trait myself to support private field, though the error has happen, but I expected to pass without any issue.
Rationale and extra context
No response
Other cases
Rust Version
Anything else?
No response
The text was updated successfully, but these errors were encountered: