Suggest unwrap_or_else
when a closure is passed to unwrap_or
instead of suggesting calling it
#102320
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.
rustc
should suggestunwrap_or_else
if the argument is a closure instead of suggesting to call the closureGiven the following code: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=15e99f8e75edf68460c457c09e4e2fa4
The current output is:
Ideally the output should look like:
The text was updated successfully, but these errors were encountered: