Bad diagnostics using ? operator on Option<Cow<'_, str>> [E507] #116335
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
D-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
No response
Rationale and extra context
Pointing to some anonymous
branch()
method from (what I presume is) animpl
forTry
feels very unhelpful here. Note also the strange suggestion which wants me to add a bareclone()
call before the expression...Other cases
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: