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 both the expression and the patterns
19 --> $DIR/match_ref_pats.rs:24:5
22 LL | | &Some(v) => println!("{:?}", v),
23 LL | | &None => println!("none"),
30 LL ~ Some(v) => println!("{:?}", v),
31 LL ~ None => println!("none"),
34 error: redundant pattern matching, consider using `is_none()`
35 --> $DIR/match_ref_pats.rs:36:12
37 LL | if let &None = a {
38 | -------^^^^^---- help: try this: `if a.is_none()`
40 = note: `-D clippy::redundant-pattern-matching` implied by `-D warnings`
42 error: redundant pattern matching, consider using `is_none()`
43 --> $DIR/match_ref_pats.rs:41:12
45 LL | if let &None = &b {
46 | -------^^^^^----- help: try this: `if b.is_none()`
48 error: you don't need to add `&` to all patterns
49 --> $DIR/match_ref_pats.rs:101:9
51 LL | / match foobar_variant!(0) {
52 LL | | &FooBar::Foo => println!("Foo"),
53 LL | | &FooBar::Bar => println!("Bar"),
54 LL | | &FooBar::FooBar => println!("FooBar"),
55 LL | | _ => println!("Wild"),
59 help: instead of prefixing all patterns with `&`, you can dereference the expression
61 LL ~ match *foobar_variant!(0) {
62 LL ~ FooBar::Foo => println!("Foo"),
63 LL ~ FooBar::Bar => println!("Bar"),
64 LL ~ FooBar::FooBar => println!("FooBar"),
67 error: aborting due to 5 previous errors