needless_return
false positive in match arm
#10390
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-negative
Issue: The lint should have been triggered on code, but wasn't
I-suggestion-causes-error
Issue: The suggestions provided by this Lint cause an ICE/error when applied
I ran
cargo clippy --fix
on my project, and it failed with the following output:Reproduction:
I was working on this project, on the commit e5087b1591032157c90d28e7925e5282df8456eb
Versions:
rustup: 1.25.1
rustc: 1.66.0
cargo: 1.66.0
clippy: 0.1.66
Issue
The problem is that clippy considers that the return at
src-tauri/src/login/microsoft/mod.rs:119
is unneeded, but it actually makes the function return at the end of the match arm, thus the arm does not need to return aWindow<Wry>
. When clippy removes it, the second arms return()
, thus it is incompatible with the first one (which returnsWindow<Wry>
).The text was updated successfully, but these errors were encountered: