rustc suggests Box<Option<T>>
, but could specialize to suggest Option<Box<T>>
instead
#91402
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.
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.
Given the following code: playground link
The current output is:
Ideally the output should look like:
This allows rustc to use the nullpointer niche optimization, and is also easier to handle, and what the user probably wants in general.
The text was updated successfully, but these errors were encountered: