Improve error message for attempt to statically allocate trait object #57186
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-newcomer-roadblock
Diagnostics: Confusing error or lint; hard to understand for new users.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Uh oh!
There was an error while loading. Please reload this page.
Simple example:
This gives the error message:
The following code works, so perhaps it would be useful for the compiler error to suggest using
Box
:The text was updated successfully, but these errors were encountered: