LL | None => println!("none"),
|
+error: redundant pattern matching, consider using `is_none()`
+ --> $DIR/match_ref_pats.rs:35:12
+ |
+LL | if let &None = a {
+ | -------^^^^^---- help: try this: `if a.is_none()`
+ |
+ = note: `-D clippy::redundant-pattern-matching` implied by `-D warnings`
+
error: you don't need to add `&` to all patterns
--> $DIR/match_ref_pats.rs:35:5
|
LL | if let None = *a {
| ^^^^ ^^
+error: redundant pattern matching, consider using `is_none()`
+ --> $DIR/match_ref_pats.rs:40:12
+ |
+LL | if let &None = &b {
+ | -------^^^^^----- help: try this: `if b.is_none()`
+
error: you don't need to add `&` to both the expression and the patterns
--> $DIR/match_ref_pats.rs:40:5
|
LL | Foo::A => println!("A"),
|
-error: aborting due to 6 previous errors
+error: aborting due to 8 previous errors