11error: this call to `as_ref` does nothing
2- --> tests/ui/useless_asref.rs:50 :18
2+ --> tests/ui/useless_asref.rs:51 :18
33 |
44LL | foo_rstr(rstr.as_ref());
55 | ^^^^^^^^^^^^^ help: try: `rstr`
@@ -11,103 +11,103 @@ LL | #![deny(clippy::useless_asref)]
1111 | ^^^^^^^^^^^^^^^^^^^^^
1212
1313error: this call to `as_ref` does nothing
14- --> tests/ui/useless_asref.rs:53 :20
14+ --> tests/ui/useless_asref.rs:54 :20
1515 |
1616LL | foo_rslice(rslice.as_ref());
1717 | ^^^^^^^^^^^^^^^ help: try: `rslice`
1818
1919error: this call to `as_mut` does nothing
20- --> tests/ui/useless_asref.rs:58 :21
20+ --> tests/ui/useless_asref.rs:59 :21
2121 |
2222LL | foo_mrslice(mrslice.as_mut());
2323 | ^^^^^^^^^^^^^^^^ help: try: `mrslice`
2424
2525error: this call to `as_ref` does nothing
26- --> tests/ui/useless_asref.rs:61 :20
26+ --> tests/ui/useless_asref.rs:62 :20
2727 |
2828LL | foo_rslice(mrslice.as_ref());
2929 | ^^^^^^^^^^^^^^^^ help: try: `mrslice`
3030
3131error: this call to `as_ref` does nothing
32- --> tests/ui/useless_asref.rs:69 :20
32+ --> tests/ui/useless_asref.rs:70 :20
3333 |
3434LL | foo_rslice(rrrrrslice.as_ref());
3535 | ^^^^^^^^^^^^^^^^^^^ help: try: `rrrrrslice`
3636
3737error: this call to `as_ref` does nothing
38- --> tests/ui/useless_asref.rs:72 :18
38+ --> tests/ui/useless_asref.rs:73 :18
3939 |
4040LL | foo_rstr(rrrrrstr.as_ref());
4141 | ^^^^^^^^^^^^^^^^^ help: try: `rrrrrstr`
4242
4343error: this call to `as_mut` does nothing
44- --> tests/ui/useless_asref.rs:78 :21
44+ --> tests/ui/useless_asref.rs:79 :21
4545 |
4646LL | foo_mrslice(mrrrrrslice.as_mut());
4747 | ^^^^^^^^^^^^^^^^^^^^ help: try: `mrrrrrslice`
4848
4949error: this call to `as_ref` does nothing
50- --> tests/ui/useless_asref.rs:81 :20
50+ --> tests/ui/useless_asref.rs:82 :20
5151 |
5252LL | foo_rslice(mrrrrrslice.as_ref());
5353 | ^^^^^^^^^^^^^^^^^^^^ help: try: `mrrrrrslice`
5454
5555error: this call to `as_ref` does nothing
56- --> tests/ui/useless_asref.rs:86 :16
56+ --> tests/ui/useless_asref.rs:87 :16
5757 |
5858LL | foo_rrrrmr((&&&&MoreRef).as_ref());
5959 | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&&&&MoreRef)`
6060
6161error: this call to `as_mut` does nothing
62- --> tests/ui/useless_asref.rs:137 :13
62+ --> tests/ui/useless_asref.rs:138 :13
6363 |
6464LL | foo_mrt(mrt.as_mut());
6565 | ^^^^^^^^^^^^ help: try: `mrt`
6666
6767error: this call to `as_ref` does nothing
68- --> tests/ui/useless_asref.rs:140 :12
68+ --> tests/ui/useless_asref.rs:141 :12
6969 |
7070LL | foo_rt(mrt.as_ref());
7171 | ^^^^^^^^^^^^ help: try: `mrt`
7272
7373error: this call to `as_ref.map(...)` does nothing
74- --> tests/ui/useless_asref.rs:152 :13
74+ --> tests/ui/useless_asref.rs:153 :13
7575 |
7676LL | let z = x.as_ref().map(String::clone);
7777 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x.clone()`
7878
7979error: this call to `as_ref.map(...)` does nothing
80- --> tests/ui/useless_asref.rs:155 :13
80+ --> tests/ui/useless_asref.rs:156 :13
8181 |
8282LL | let z = x.as_ref().map(|z| z.clone());
8383 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x.clone()`
8484
8585error: this call to `as_ref.map(...)` does nothing
86- --> tests/ui/useless_asref.rs:158 :13
86+ --> tests/ui/useless_asref.rs:159 :13
8787 |
8888LL | let z = x.as_ref().map(|z| String::clone(z));
8989 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x.clone()`
9090
9191error: this call to `as_ref.map(...)` does nothing
92- --> tests/ui/useless_asref.rs:182 :9
92+ --> tests/ui/useless_asref.rs:183 :9
9393 |
9494LL | x.field.as_ref().map(|v| v.clone());
9595 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x.field.clone()`
9696
9797error: this call to `as_ref.map(...)` does nothing
98- --> tests/ui/useless_asref.rs:185 :9
98+ --> tests/ui/useless_asref.rs:186 :9
9999 |
100100LL | x.field.as_ref().map(Clone::clone);
101101 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x.field.clone()`
102102
103103error: this call to `as_ref.map(...)` does nothing
104- --> tests/ui/useless_asref.rs:188 :9
104+ --> tests/ui/useless_asref.rs:189 :9
105105 |
106106LL | x.field.as_ref().map(|v| Clone::clone(v));
107107 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x.field.clone()`
108108
109109error: this call to `as_ref.map(...)` does nothing
110- --> tests/ui/useless_asref.rs:193 :9
110+ --> tests/ui/useless_asref.rs:194 :9
111111 |
112112LL | Some(1).as_ref().map(|&x| x.clone());
113113 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Some(1).clone()`
0 commit comments