mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 13:43:17 +00:00
11 lines
500 B
Text
11 lines
500 B
Text
error: redundant pattern matching, consider using `is_ok()`
|
|
--> tests/ui/crashes/ice-7169.rs:10:12
|
|
|
|
|
LL | if let Ok(_) = Ok::<_, ()>(A::<String>::default()) {}
|
|
| -------^^^^^-------------------------------------- help: try: `if Ok::<_, ()>(A::<String>::default()).is_ok()`
|
|
|
|
|
= note: `-D clippy::redundant-pattern-matching` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::redundant_pattern_matching)]`
|
|
|
|
error: aborting due to 1 previous error
|
|
|