summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/useless_asref.stderr
blob: 67ce8b64e0e3d21613b1a31099c04931336746c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
error: this call to `as_ref` does nothing
  --> $DIR/useless_asref.rs:43:18
   |
LL |         foo_rstr(rstr.as_ref());
   |                  ^^^^^^^^^^^^^ help: try this: `rstr`
   |
note: the lint level is defined here
  --> $DIR/useless_asref.rs:2:9
   |
LL | #![deny(clippy::useless_asref)]
   |         ^^^^^^^^^^^^^^^^^^^^^

error: this call to `as_ref` does nothing
  --> $DIR/useless_asref.rs:45:20
   |
LL |         foo_rslice(rslice.as_ref());
   |                    ^^^^^^^^^^^^^^^ help: try this: `rslice`

error: this call to `as_mut` does nothing
  --> $DIR/useless_asref.rs:49:21
   |
LL |         foo_mrslice(mrslice.as_mut());
   |                     ^^^^^^^^^^^^^^^^ help: try this: `mrslice`

error: this call to `as_ref` does nothing
  --> $DIR/useless_asref.rs:51:20
   |
LL |         foo_rslice(mrslice.as_ref());
   |                    ^^^^^^^^^^^^^^^^ help: try this: `mrslice`

error: this call to `as_ref` does nothing
  --> $DIR/useless_asref.rs:58:20
   |
LL |         foo_rslice(rrrrrslice.as_ref());
   |                    ^^^^^^^^^^^^^^^^^^^ help: try this: `rrrrrslice`

error: this call to `as_ref` does nothing
  --> $DIR/useless_asref.rs:60:18
   |
LL |         foo_rstr(rrrrrstr.as_ref());
   |                  ^^^^^^^^^^^^^^^^^ help: try this: `rrrrrstr`

error: this call to `as_mut` does nothing
  --> $DIR/useless_asref.rs:65:21
   |
LL |         foo_mrslice(mrrrrrslice.as_mut());
   |                     ^^^^^^^^^^^^^^^^^^^^ help: try this: `mrrrrrslice`

error: this call to `as_ref` does nothing
  --> $DIR/useless_asref.rs:67:20
   |
LL |         foo_rslice(mrrrrrslice.as_ref());
   |                    ^^^^^^^^^^^^^^^^^^^^ help: try this: `mrrrrrslice`

error: this call to `as_ref` does nothing
  --> $DIR/useless_asref.rs:71:16
   |
LL |     foo_rrrrmr((&&&&MoreRef).as_ref());
   |                ^^^^^^^^^^^^^^^^^^^^^^ help: try this: `(&&&&MoreRef)`

error: this call to `as_mut` does nothing
  --> $DIR/useless_asref.rs:121:13
   |
LL |     foo_mrt(mrt.as_mut());
   |             ^^^^^^^^^^^^ help: try this: `mrt`

error: this call to `as_ref` does nothing
  --> $DIR/useless_asref.rs:123:12
   |
LL |     foo_rt(mrt.as_ref());
   |            ^^^^^^^^^^^^ help: try this: `mrt`

error: aborting due to 11 previous errors