11error: this pattern creates a reference to a reference
2- --> tests/ui/ref_binding_to_reference.rs:29 :14
2+ --> tests/ui/ref_binding_to_reference.rs:52 :14
33 |
4- LL | Some(ref x) => x ,
4+ LL | Some(ref x) => m2!(x) ,
55 | ^^^^^
66 |
77 = note: `-D clippy::ref-binding-to-reference` implied by `-D warnings`
88 = help: to override `-D warnings` add `#[allow(clippy::ref_binding_to_reference)]`
99help: try
1010 |
11- LL - Some(ref x) => x,
12- LL + Some(x) => &x,
13- |
14-
15- error: this pattern creates a reference to a reference
16- --> tests/ui/ref_binding_to_reference.rs:36:14
17- |
18- LL | Some(ref x) => {
19- | ^^^^^
20- |
21- help: try
22- |
23- LL ~ Some(x) => {
24- LL |
25- LL |
26- LL | f1(x);
27- LL ~ f1(x);
28- LL ~ &x
29- |
30-
31- error: this pattern creates a reference to a reference
32- --> tests/ui/ref_binding_to_reference.rs:48:14
33- |
34- LL | Some(ref x) => m2!(x),
35- | ^^^^^
36- |
37- help: try
38- |
3911LL - Some(ref x) => m2!(x),
4012LL + Some(x) => m2!(&x),
4113 |
4214
4315error: this pattern creates a reference to a reference
44- --> tests/ui/ref_binding_to_reference.rs:54 :15
16+ --> tests/ui/ref_binding_to_reference.rs:58 :15
4517 |
4618LL | let _ = |&ref x: &&String| {
4719 | ^^^^^
@@ -55,7 +27,7 @@ LL ~ let _: &&String = &x;
5527 |
5628
5729error: this pattern creates a reference to a reference
58- --> tests/ui/ref_binding_to_reference.rs:62 :12
30+ --> tests/ui/ref_binding_to_reference.rs:66 :12
5931 |
6032LL | fn f2<'a>(&ref x: &&'a String) -> &'a String {
6133 | ^^^^^
7042 |
7143
7244error: this pattern creates a reference to a reference
73- --> tests/ui/ref_binding_to_reference.rs:71 :11
45+ --> tests/ui/ref_binding_to_reference.rs:75 :11
7446 |
7547LL | fn f(&ref x: &&String) {
7648 | ^^^^^
@@ -84,7 +56,7 @@ LL ~ let _: &&String = &x;
8456 |
8557
8658error: this pattern creates a reference to a reference
87- --> tests/ui/ref_binding_to_reference.rs:81 :11
59+ --> tests/ui/ref_binding_to_reference.rs:85 :11
8860 |
8961LL | fn f(&ref x: &&String) {
9062 | ^^^^^
9769LL ~ let _: &&String = &x;
9870 |
9971
100- error: aborting due to 7 previous errors
72+ error: aborting due to 5 previous errors
10173
0 commit comments