E0308 .as_deref()
suggestion is asymmetric
#114087
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.
Uh oh!
There was an error while loading. Please reload this page.
Code
Current output
Desired output
Rationale and extra context
This is an obvious suggestion that is already implemented, but only checked for when the order of
a
andb
is swapped.Other cases
.as_deref()
is suggested correctly when the order ofa
andb
in the comparison is swapped.Anything else?
A fix for this would likely also fix #102063, as this issue is closely related.
@clubby789 maybe you're interested in working on this? It's related to #114050, which you fixed yesterday (thanks for that by the way).
The text was updated successfully, but these errors were encountered: