- 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 thing
Description
Summary
Use of match, matching Result
or Option
; do not trigger clippy::redundant_pattern_matching
Reproducer
I tried this code:
match Err::<i32, i32>(55) { Ok(_) => true, _ => false, };
I expected to see this happen:
Err::<i32, i32>(55).is_ok();
Instead, this happened:
match Err::<i32, i32>(55) { Ok(_) => true, _ => false, };
Version
rustc 1.71.0-nightly (b628260df 2023-04-22) binary: rustc commit-hash: b628260df0587ae559253d8640ecb8738d3de613 commit-date: 2023-04-22 host: x86_64-unknown-linux-gnu release: 1.71.0-nightly LLVM version: 16.0.2
Additional Labels
No response
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thing