-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't haveI-suggestion-causes-errorIssue: The suggestions provided by this Lint cause an ICE/error when appliedIssue: The suggestions provided by this Lint cause an ICE/error when applied
Description
This code:
fn foo(bar: Result<(), ()>) {
bar.unwrap_or_else(|_| return)
}
is suggested to remove the return, like this:
fn foo(bar: Result<(), ()>) {
bar.unwrap_or_else(|_| )
}
Which is invalid rust code.
Meta
cargo clippy -V
: clippy 0.0.212 (bb1fbbf 2020-12-22)rustc -Vv
:
rustc 1.50.0-nightly (bb1fbbf84 2020-12-22)
binary: rustc
commit-hash: bb1fbbf84455fbad9afd26c17e0f725019322655
commit-date: 2020-12-22
host: x86_64-unknown-linux-gnu
release: 1.50.0-nightly
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't haveI-suggestion-causes-errorIssue: The suggestions provided by this Lint cause an ICE/error when appliedIssue: The suggestions provided by this Lint cause an ICE/error when applied