1
1
error: this call to `as_ref` does nothing
2
- --> tests/ui/useless_asref.rs:50 :18
2
+ --> tests/ui/useless_asref.rs:51 :18
3
3
|
4
4
LL | foo_rstr(rstr.as_ref());
5
5
| ^^^^^^^^^^^^^ help: try: `rstr`
@@ -11,103 +11,103 @@ LL | #![deny(clippy::useless_asref)]
11
11
| ^^^^^^^^^^^^^^^^^^^^^
12
12
13
13
error: this call to `as_ref` does nothing
14
- --> tests/ui/useless_asref.rs:53 :20
14
+ --> tests/ui/useless_asref.rs:54 :20
15
15
|
16
16
LL | foo_rslice(rslice.as_ref());
17
17
| ^^^^^^^^^^^^^^^ help: try: `rslice`
18
18
19
19
error: this call to `as_mut` does nothing
20
- --> tests/ui/useless_asref.rs:58 :21
20
+ --> tests/ui/useless_asref.rs:59 :21
21
21
|
22
22
LL | foo_mrslice(mrslice.as_mut());
23
23
| ^^^^^^^^^^^^^^^^ help: try: `mrslice`
24
24
25
25
error: this call to `as_ref` does nothing
26
- --> tests/ui/useless_asref.rs:61 :20
26
+ --> tests/ui/useless_asref.rs:62 :20
27
27
|
28
28
LL | foo_rslice(mrslice.as_ref());
29
29
| ^^^^^^^^^^^^^^^^ help: try: `mrslice`
30
30
31
31
error: this call to `as_ref` does nothing
32
- --> tests/ui/useless_asref.rs:69 :20
32
+ --> tests/ui/useless_asref.rs:70 :20
33
33
|
34
34
LL | foo_rslice(rrrrrslice.as_ref());
35
35
| ^^^^^^^^^^^^^^^^^^^ help: try: `rrrrrslice`
36
36
37
37
error: this call to `as_ref` does nothing
38
- --> tests/ui/useless_asref.rs:72 :18
38
+ --> tests/ui/useless_asref.rs:73 :18
39
39
|
40
40
LL | foo_rstr(rrrrrstr.as_ref());
41
41
| ^^^^^^^^^^^^^^^^^ help: try: `rrrrrstr`
42
42
43
43
error: this call to `as_mut` does nothing
44
- --> tests/ui/useless_asref.rs:78 :21
44
+ --> tests/ui/useless_asref.rs:79 :21
45
45
|
46
46
LL | foo_mrslice(mrrrrrslice.as_mut());
47
47
| ^^^^^^^^^^^^^^^^^^^^ help: try: `mrrrrrslice`
48
48
49
49
error: this call to `as_ref` does nothing
50
- --> tests/ui/useless_asref.rs:81 :20
50
+ --> tests/ui/useless_asref.rs:82 :20
51
51
|
52
52
LL | foo_rslice(mrrrrrslice.as_ref());
53
53
| ^^^^^^^^^^^^^^^^^^^^ help: try: `mrrrrrslice`
54
54
55
55
error: this call to `as_ref` does nothing
56
- --> tests/ui/useless_asref.rs:86 :16
56
+ --> tests/ui/useless_asref.rs:87 :16
57
57
|
58
58
LL | foo_rrrrmr((&&&&MoreRef).as_ref());
59
59
| ^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&&&&MoreRef)`
60
60
61
61
error: this call to `as_mut` does nothing
62
- --> tests/ui/useless_asref.rs:137 :13
62
+ --> tests/ui/useless_asref.rs:138 :13
63
63
|
64
64
LL | foo_mrt(mrt.as_mut());
65
65
| ^^^^^^^^^^^^ help: try: `mrt`
66
66
67
67
error: this call to `as_ref` does nothing
68
- --> tests/ui/useless_asref.rs:140 :12
68
+ --> tests/ui/useless_asref.rs:141 :12
69
69
|
70
70
LL | foo_rt(mrt.as_ref());
71
71
| ^^^^^^^^^^^^ help: try: `mrt`
72
72
73
73
error: this call to `as_ref.map(...)` does nothing
74
- --> tests/ui/useless_asref.rs:152 :13
74
+ --> tests/ui/useless_asref.rs:153 :13
75
75
|
76
76
LL | let z = x.as_ref().map(String::clone);
77
77
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x.clone()`
78
78
79
79
error: this call to `as_ref.map(...)` does nothing
80
- --> tests/ui/useless_asref.rs:155 :13
80
+ --> tests/ui/useless_asref.rs:156 :13
81
81
|
82
82
LL | let z = x.as_ref().map(|z| z.clone());
83
83
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x.clone()`
84
84
85
85
error: this call to `as_ref.map(...)` does nothing
86
- --> tests/ui/useless_asref.rs:158 :13
86
+ --> tests/ui/useless_asref.rs:159 :13
87
87
|
88
88
LL | let z = x.as_ref().map(|z| String::clone(z));
89
89
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x.clone()`
90
90
91
91
error: this call to `as_ref.map(...)` does nothing
92
- --> tests/ui/useless_asref.rs:182 :9
92
+ --> tests/ui/useless_asref.rs:183 :9
93
93
|
94
94
LL | x.field.as_ref().map(|v| v.clone());
95
95
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x.field.clone()`
96
96
97
97
error: this call to `as_ref.map(...)` does nothing
98
- --> tests/ui/useless_asref.rs:185 :9
98
+ --> tests/ui/useless_asref.rs:186 :9
99
99
|
100
100
LL | x.field.as_ref().map(Clone::clone);
101
101
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x.field.clone()`
102
102
103
103
error: this call to `as_ref.map(...)` does nothing
104
- --> tests/ui/useless_asref.rs:188 :9
104
+ --> tests/ui/useless_asref.rs:189 :9
105
105
|
106
106
LL | x.field.as_ref().map(|v| Clone::clone(v));
107
107
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x.field.clone()`
108
108
109
109
error: this call to `as_ref.map(...)` does nothing
110
- --> tests/ui/useless_asref.rs:193 :9
110
+ --> tests/ui/useless_asref.rs:194 :9
111
111
|
112
112
LL | Some(1).as_ref().map(|&x| x.clone());
113
113
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Some(1).clone()`
0 commit comments