Incorrect behaviour change suggestion for manual_ok_err
#14660
Labels
C-bug
Category: Clippy is not doing the correct thing
manual_ok_err
#14660
Summary
This code snippet gets incorrectly caught by the
manual_ok_err
check when it is incorrect to apply it. The expected behaviour is that the clippy lint does not fire in this function.Clippy suggests:
I reviewed issue #14533 and #14239 as well which looked related to
manual_ok_err
but they don't immediately seem to be the same issue to me.Reproducer
I tried this code:
I expected to see this happen:
No clippy lint fires.
Instead, this happened:
Clippy lint fires and suggests a behaviour change.
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: