1 error: you don't need to add `&` to all patterns
2 --> $DIR/match_ref_pats.rs:7:9
5 LL | | &Some(v) => println!("{:?}", v),
6 LL | | &None => println!("none"),
10 = note: `-D clippy::match-ref-pats` implied by `-D warnings`
11 help: instead of prefixing all patterns with `&`, you can dereference the expression
14 LL ~ Some(v) => println!("{:?}", v),
15 LL ~ None => println!("none"),
18 error: you don't need to add `&` to all patterns
19 --> $DIR/match_ref_pats.rs:18:5
22 LL | | &(v, 1) => println!("{}", v),
23 LL | | _ => println!("none"),
27 help: instead of prefixing all patterns with `&`, you can dereference the expression
30 LL ~ (v, 1) => println!("{}", v),
33 error: you don't need to add `&` to both the expression and the patterns
34 --> $DIR/match_ref_pats.rs:24:5
37 LL | | &Some(v) => println!("{:?}", v),
38 LL | | &None => println!("none"),
45 LL ~ Some(v) => println!("{:?}", v),
46 LL ~ None => println!("none"),
49 error: redundant pattern matching, consider using `is_none()`
50 --> $DIR/match_ref_pats.rs:36:12
52 LL | if let &None = a {
53 | -------^^^^^---- help: try this: `if a.is_none()`
55 = note: `-D clippy::redundant-pattern-matching` implied by `-D warnings`
57 error: you don't need to add `&` to all patterns
58 --> $DIR/match_ref_pats.rs:36:5
60 LL | / if let &None = a {
61 LL | | println!("none");
65 help: instead of prefixing all patterns with `&`, you can dereference the expression
67 LL | if let None = *a {
70 error: redundant pattern matching, consider using `is_none()`
71 --> $DIR/match_ref_pats.rs:41:12
73 LL | if let &None = &b {
74 | -------^^^^^----- help: try this: `if b.is_none()`
76 error: you don't need to add `&` to both the expression and the patterns
77 --> $DIR/match_ref_pats.rs:41:5
79 LL | / if let &None = &b {
80 LL | | println!("none");
86 LL | if let None = b {
89 error: you don't need to add `&` to all patterns
90 --> $DIR/match_ref_pats.rs:68:9
92 LL | / match foo_variant!(0) {
93 LL | | &Foo::A => println!("A"),
94 LL | | _ => println!("Wild"),
98 help: instead of prefixing all patterns with `&`, you can dereference the expression
100 LL ~ match *foo_variant!(0) {
101 LL ~ Foo::A => println!("A"),
104 error: aborting due to 8 previous errors