]>
Commit | Line | Data |
---|---|---|
064997fb | 1 | error: deref which would be done by auto-deref |
781aab86 | 2 | --> $DIR/explicit_auto_deref.rs:68:19 |
064997fb FG |
3 | | |
4 | LL | let _: &str = &*s; | |
add651ee | 5 | | ^^^ help: try: `&s` |
064997fb FG |
6 | | |
7 | = note: `-D clippy::explicit-auto-deref` implied by `-D warnings` | |
781aab86 | 8 | = help: to override `-D warnings` add `#[allow(clippy::explicit_auto_deref)]` |
064997fb FG |
9 | |
10 | error: deref which would be done by auto-deref | |
781aab86 | 11 | --> $DIR/explicit_auto_deref.rs:69:19 |
f2b60f7d FG |
12 | | |
13 | LL | let _: &str = &*{ String::new() }; | |
add651ee | 14 | | ^^^^^^^^^^^^^^^^^^^ help: try: `&{ String::new() }` |
f2b60f7d FG |
15 | |
16 | error: deref which would be done by auto-deref | |
781aab86 | 17 | --> $DIR/explicit_auto_deref.rs:70:19 |
f2b60f7d FG |
18 | | |
19 | LL | let _: &str = &mut *{ String::new() }; | |
add651ee | 20 | | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&mut { String::new() }` |
f2b60f7d FG |
21 | |
22 | error: deref which would be done by auto-deref | |
781aab86 | 23 | --> $DIR/explicit_auto_deref.rs:74:11 |
064997fb FG |
24 | | |
25 | LL | f_str(&*s); | |
add651ee | 26 | | ^^^ help: try: `&s` |
064997fb FG |
27 | |
28 | error: deref which would be done by auto-deref | |
781aab86 | 29 | --> $DIR/explicit_auto_deref.rs:78:13 |
064997fb FG |
30 | | |
31 | LL | f_str_t(&*s, &*s); // Don't lint second param. | |
add651ee | 32 | | ^^^ help: try: `&s` |
064997fb FG |
33 | |
34 | error: deref which would be done by auto-deref | |
781aab86 | 35 | --> $DIR/explicit_auto_deref.rs:81:24 |
064997fb FG |
36 | | |
37 | LL | let _: &Box<i32> = &**b; | |
add651ee | 38 | | ^^^^ help: try: `&b` |
064997fb FG |
39 | |
40 | error: deref which would be done by auto-deref | |
781aab86 | 41 | --> $DIR/explicit_auto_deref.rs:87:7 |
064997fb FG |
42 | | |
43 | LL | c(&*s); | |
add651ee | 44 | | ^^^ help: try: `&s` |
064997fb FG |
45 | |
46 | error: deref which would be done by auto-deref | |
781aab86 | 47 | --> $DIR/explicit_auto_deref.rs:93:9 |
064997fb FG |
48 | | |
49 | LL | &**x | |
add651ee | 50 | | ^^^^ help: try: `x` |
064997fb FG |
51 | |
52 | error: deref which would be done by auto-deref | |
781aab86 | 53 | --> $DIR/explicit_auto_deref.rs:97:11 |
064997fb FG |
54 | | |
55 | LL | { &**x } | |
add651ee | 56 | | ^^^^ help: try: `x` |
064997fb FG |
57 | |
58 | error: deref which would be done by auto-deref | |
781aab86 | 59 | --> $DIR/explicit_auto_deref.rs:101:9 |
064997fb FG |
60 | | |
61 | LL | &**{ x } | |
add651ee | 62 | | ^^^^^^^^ help: try: `{ x }` |
064997fb FG |
63 | |
64 | error: deref which would be done by auto-deref | |
781aab86 | 65 | --> $DIR/explicit_auto_deref.rs:105:9 |
064997fb FG |
66 | | |
67 | LL | &***x | |
add651ee | 68 | | ^^^^^ help: try: `x` |
064997fb FG |
69 | |
70 | error: deref which would be done by auto-deref | |
781aab86 | 71 | --> $DIR/explicit_auto_deref.rs:122:12 |
064997fb FG |
72 | | |
73 | LL | f1(&*x); | |
add651ee | 74 | | ^^^ help: try: `&x` |
064997fb FG |
75 | |
76 | error: deref which would be done by auto-deref | |
781aab86 | 77 | --> $DIR/explicit_auto_deref.rs:123:12 |
064997fb FG |
78 | | |
79 | LL | f2(&*x); | |
add651ee | 80 | | ^^^ help: try: `&x` |
064997fb FG |
81 | |
82 | error: deref which would be done by auto-deref | |
781aab86 | 83 | --> $DIR/explicit_auto_deref.rs:124:12 |
064997fb FG |
84 | | |
85 | LL | f3(&*x); | |
add651ee | 86 | | ^^^ help: try: `&x` |
064997fb FG |
87 | |
88 | error: deref which would be done by auto-deref | |
781aab86 | 89 | --> $DIR/explicit_auto_deref.rs:125:27 |
064997fb FG |
90 | | |
91 | LL | f4.callable_str()(&*x); | |
add651ee | 92 | | ^^^ help: try: `&x` |
064997fb FG |
93 | |
94 | error: deref which would be done by auto-deref | |
781aab86 | 95 | --> $DIR/explicit_auto_deref.rs:126:12 |
064997fb FG |
96 | | |
97 | LL | f5(&*x); | |
add651ee | 98 | | ^^^ help: try: `&x` |
064997fb FG |
99 | |
100 | error: deref which would be done by auto-deref | |
781aab86 | 101 | --> $DIR/explicit_auto_deref.rs:127:12 |
064997fb FG |
102 | | |
103 | LL | f6(&*x); | |
add651ee | 104 | | ^^^ help: try: `&x` |
064997fb FG |
105 | |
106 | error: deref which would be done by auto-deref | |
781aab86 | 107 | --> $DIR/explicit_auto_deref.rs:128:27 |
064997fb FG |
108 | | |
109 | LL | f7.callable_str()(&*x); | |
add651ee | 110 | | ^^^ help: try: `&x` |
064997fb FG |
111 | |
112 | error: deref which would be done by auto-deref | |
781aab86 | 113 | --> $DIR/explicit_auto_deref.rs:129:25 |
064997fb FG |
114 | | |
115 | LL | f8.callable_t()(&*x); | |
add651ee | 116 | | ^^^ help: try: `&x` |
064997fb FG |
117 | |
118 | error: deref which would be done by auto-deref | |
781aab86 | 119 | --> $DIR/explicit_auto_deref.rs:130:12 |
064997fb FG |
120 | | |
121 | LL | f9(&*x); | |
add651ee | 122 | | ^^^ help: try: `&x` |
064997fb FG |
123 | |
124 | error: deref which would be done by auto-deref | |
781aab86 | 125 | --> $DIR/explicit_auto_deref.rs:131:13 |
064997fb FG |
126 | | |
127 | LL | f10(&*x); | |
add651ee | 128 | | ^^^ help: try: `&x` |
064997fb FG |
129 | |
130 | error: deref which would be done by auto-deref | |
781aab86 | 131 | --> $DIR/explicit_auto_deref.rs:132:26 |
064997fb FG |
132 | | |
133 | LL | f11.callable_t()(&*x); | |
add651ee | 134 | | ^^^ help: try: `&x` |
064997fb FG |
135 | |
136 | error: deref which would be done by auto-deref | |
781aab86 | 137 | --> $DIR/explicit_auto_deref.rs:136:16 |
064997fb FG |
138 | | |
139 | LL | let _ = S1(&*s); | |
add651ee | 140 | | ^^^ help: try: `&s` |
064997fb FG |
141 | |
142 | error: deref which would be done by auto-deref | |
781aab86 | 143 | --> $DIR/explicit_auto_deref.rs:141:21 |
064997fb FG |
144 | | |
145 | LL | let _ = S2 { s: &*s }; | |
add651ee | 146 | | ^^^ help: try: `&s` |
064997fb FG |
147 | |
148 | error: deref which would be done by auto-deref | |
781aab86 | 149 | --> $DIR/explicit_auto_deref.rs:157:30 |
064997fb FG |
150 | | |
151 | LL | let _ = Self::S1(&**s); | |
add651ee | 152 | | ^^^^ help: try: `s` |
064997fb FG |
153 | |
154 | error: deref which would be done by auto-deref | |
781aab86 | 155 | --> $DIR/explicit_auto_deref.rs:158:35 |
064997fb FG |
156 | | |
157 | LL | let _ = Self::S2 { s: &**s }; | |
add651ee | 158 | | ^^^^ help: try: `s` |
064997fb FG |
159 | |
160 | error: deref which would be done by auto-deref | |
781aab86 | 161 | --> $DIR/explicit_auto_deref.rs:161:20 |
064997fb FG |
162 | | |
163 | LL | let _ = E1::S1(&*s); | |
add651ee | 164 | | ^^^ help: try: `&s` |
064997fb FG |
165 | |
166 | error: deref which would be done by auto-deref | |
781aab86 | 167 | --> $DIR/explicit_auto_deref.rs:162:25 |
064997fb FG |
168 | | |
169 | LL | let _ = E1::S2 { s: &*s }; | |
add651ee | 170 | | ^^^ help: try: `&s` |
064997fb FG |
171 | |
172 | error: deref which would be done by auto-deref | |
781aab86 | 173 | --> $DIR/explicit_auto_deref.rs:180:13 |
064997fb FG |
174 | | |
175 | LL | let _ = (*b).foo; | |
add651ee | 176 | | ^^^^ help: try: `b` |
064997fb FG |
177 | |
178 | error: deref which would be done by auto-deref | |
781aab86 | 179 | --> $DIR/explicit_auto_deref.rs:181:13 |
064997fb FG |
180 | | |
181 | LL | let _ = (**b).foo; | |
add651ee | 182 | | ^^^^^ help: try: `b` |
064997fb FG |
183 | |
184 | error: deref which would be done by auto-deref | |
781aab86 | 185 | --> $DIR/explicit_auto_deref.rs:196:19 |
064997fb FG |
186 | | |
187 | LL | let _ = f_str(*ref_str); | |
add651ee | 188 | | ^^^^^^^^ help: try: `ref_str` |
064997fb FG |
189 | |
190 | error: deref which would be done by auto-deref | |
781aab86 | 191 | --> $DIR/explicit_auto_deref.rs:198:19 |
064997fb FG |
192 | | |
193 | LL | let _ = f_str(**ref_ref_str); | |
add651ee | 194 | | ^^^^^^^^^^^^^ help: try: `ref_ref_str` |
064997fb FG |
195 | |
196 | error: deref which would be done by auto-deref | |
781aab86 | 197 | --> $DIR/explicit_auto_deref.rs:208:12 |
064997fb FG |
198 | | |
199 | LL | f_str(&&*ref_str); // `needless_borrow` will suggest removing both references | |
781aab86 | 200 | | ^^^^^^^^^ help: try: `ref_str` |
064997fb FG |
201 | |
202 | error: deref which would be done by auto-deref | |
781aab86 | 203 | --> $DIR/explicit_auto_deref.rs:209:12 |
064997fb FG |
204 | | |
205 | LL | f_str(&&**ref_str); // `needless_borrow` will suggest removing only one reference | |
add651ee | 206 | | ^^^^^^^^^^ help: try: `ref_str` |
064997fb FG |
207 | |
208 | error: deref which would be done by auto-deref | |
781aab86 | 209 | --> $DIR/explicit_auto_deref.rs:218:41 |
064997fb FG |
210 | | |
211 | LL | let _ = || -> &'static str { return *s }; | |
add651ee | 212 | | ^^ help: try: `s` |
064997fb | 213 | |
f2b60f7d | 214 | error: deref which would be done by auto-deref |
781aab86 | 215 | --> $DIR/explicit_auto_deref.rs:237:9 |
f2b60f7d FG |
216 | | |
217 | LL | &**x | |
add651ee | 218 | | ^^^^ help: try: `x` |
f2b60f7d FG |
219 | |
220 | error: deref which would be done by auto-deref | |
781aab86 | 221 | --> $DIR/explicit_auto_deref.rs:260:8 |
f2b60f7d FG |
222 | | |
223 | LL | c1(*x); | |
add651ee | 224 | | ^^ help: try: `x` |
f2b60f7d FG |
225 | |
226 | error: deref which would be done by auto-deref | |
781aab86 | 227 | --> $DIR/explicit_auto_deref.rs:263:20 |
f2b60f7d FG |
228 | | |
229 | LL | return *x; | |
add651ee | 230 | | ^^ help: try: `x` |
f2b60f7d FG |
231 | |
232 | error: deref which would be done by auto-deref | |
781aab86 | 233 | --> $DIR/explicit_auto_deref.rs:265:9 |
f2b60f7d FG |
234 | | |
235 | LL | *x | |
add651ee | 236 | | ^^ help: try: `x` |
f2b60f7d | 237 | |
781aab86 FG |
238 | error: deref which would be done by auto-deref |
239 | --> $DIR/explicit_auto_deref.rs:299:20 | |
240 | | | |
241 | LL | Some(x) => &mut *x, | |
242 | | ^^^^^^^ help: try: `x` | |
243 | ||
244 | error: aborting due to 40 previous errors | |
064997fb | 245 |