11error: you don't need to add `&` to all patterns
2- --> tests/ui/match_ref_pats.rs:8 :9
2+ --> tests/ui/match_ref_pats.rs:14 :9
33 |
44LL | / match v {
55LL | |
@@ -19,7 +19,7 @@ LL ~ None => println!("none"),
1919 |
2020
2121error: you don't need to add `&` to both the expression and the patterns
22- --> tests/ui/match_ref_pats.rs:26 :5
22+ --> tests/ui/match_ref_pats.rs:32 :5
2323 |
2424LL | / match &w {
2525LL | |
@@ -37,7 +37,7 @@ LL ~ None => println!("none"),
3737 |
3838
3939error: redundant pattern matching, consider using `is_none()`
40- --> tests/ui/match_ref_pats.rs:39 :12
40+ --> tests/ui/match_ref_pats.rs:45 :12
4141 |
4242LL | if let &None = a {
4343 | -------^^^^^---- help: try: `if a.is_none()`
@@ -46,13 +46,13 @@ LL | if let &None = a {
4646 = help: to override `-D warnings` add `#[allow(clippy::redundant_pattern_matching)]`
4747
4848error: redundant pattern matching, consider using `is_none()`
49- --> tests/ui/match_ref_pats.rs:45 :12
49+ --> tests/ui/match_ref_pats.rs:51 :12
5050 |
5151LL | if let &None = &b {
5252 | -------^^^^^----- help: try: `if b.is_none()`
5353
5454error: you don't need to add `&` to all patterns
55- --> tests/ui/match_ref_pats.rs:106 :9
55+ --> tests/ui/match_ref_pats.rs:112 :9
5656 |
5757LL | / match foobar_variant!(0) {
5858LL | |
0 commit comments