1 error: this call to `as_ref` does nothing
2 --> $DIR/useless_asref.rs:33:18
4 33 | foo_rstr(rstr.as_ref());
5 | ^^^^^^^^^^^^^ help: try this: `rstr`
7 note: lint level defined here
8 --> $DIR/useless_asref.rs:3:9
10 3 | #![deny(clippy::useless_asref)]
11 | ^^^^^^^^^^^^^^^^^^^^^
13 error: this call to `as_ref` does nothing
14 --> $DIR/useless_asref.rs:35:20
16 35 | foo_rslice(rslice.as_ref());
17 | ^^^^^^^^^^^^^^^ help: try this: `rslice`
19 error: this call to `as_mut` does nothing
20 --> $DIR/useless_asref.rs:39:21
22 39 | foo_mrslice(mrslice.as_mut());
23 | ^^^^^^^^^^^^^^^^ help: try this: `mrslice`
25 error: this call to `as_ref` does nothing
26 --> $DIR/useless_asref.rs:41:20
28 41 | foo_rslice(mrslice.as_ref());
29 | ^^^^^^^^^^^^^^^^ help: try this: `mrslice`
31 error: this call to `as_ref` does nothing
32 --> $DIR/useless_asref.rs:48:20
34 48 | foo_rslice(rrrrrslice.as_ref());
35 | ^^^^^^^^^^^^^^^^^^^ help: try this: `rrrrrslice`
37 error: this call to `as_ref` does nothing
38 --> $DIR/useless_asref.rs:50:18
40 50 | foo_rstr(rrrrrstr.as_ref());
41 | ^^^^^^^^^^^^^^^^^ help: try this: `rrrrrstr`
43 error: this call to `as_mut` does nothing
44 --> $DIR/useless_asref.rs:55:21
46 55 | foo_mrslice(mrrrrrslice.as_mut());
47 | ^^^^^^^^^^^^^^^^^^^^ help: try this: `mrrrrrslice`
49 error: this call to `as_ref` does nothing
50 --> $DIR/useless_asref.rs:57:20
52 57 | foo_rslice(mrrrrrslice.as_ref());
53 | ^^^^^^^^^^^^^^^^^^^^ help: try this: `mrrrrrslice`
55 error: this call to `as_ref` does nothing
56 --> $DIR/useless_asref.rs:60:16
58 60 | foo_rrrrmr((&&&&MoreRef).as_ref());
59 | ^^^^^^^^^^^^^^^^^^^^^^ help: try this: `(&&&&MoreRef)`
61 error: this call to `as_mut` does nothing
62 --> $DIR/useless_asref.rs:106:13
64 106 | foo_mrt(mrt.as_mut());
65 | ^^^^^^^^^^^^ help: try this: `mrt`
67 error: this call to `as_ref` does nothing
68 --> $DIR/useless_asref.rs:108:12
70 108 | foo_rt(mrt.as_ref());
71 | ^^^^^^^^^^^^ help: try this: `mrt`
73 error: aborting due to 11 previous errors