try_err false positive / incorrect suggestion with Poll return type #5855
Labels
C-bug
Category: Clippy is not doing the correct thing
I-suggestion-causes-error
Issue: The suggestions provided by this Lint cause an ICE/error when applied
The
Poll
type has two implementations ofTry
trait, forPoll<Result<T, E>>
andPoll<Option<Result<T, E>>>
.Currently try_err lint does't take those into account and generates incorrect fix suggestion, for example in code below:
Additionally, given overall verbosity of replacement code, it is far from clear that replacing
?
is an improvement in this case.The text was updated successfully, but these errors were encountered: