1 error: deref which would be done by auto-deref
2 --> $DIR/explicit_auto_deref.rs:70:19
4 LL | let _: &str = &*s;
5 | ^^^ help: try this: `&s`
7 = note: `-D clippy::explicit-auto-deref` implied by `-D warnings`
9 error: deref which would be done by auto-deref
10 --> $DIR/explicit_auto_deref.rs:71:19
12 LL | let _: &str = &*{ String::new() };
13 | ^^^^^^^^^^^^^^^^^^^ help: try this: `&{ String::new() }`
15 error: deref which would be done by auto-deref
16 --> $DIR/explicit_auto_deref.rs:72:19
18 LL | let _: &str = &mut *{ String::new() };
19 | ^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&mut { String::new() }`
21 error: deref which would be done by auto-deref
22 --> $DIR/explicit_auto_deref.rs:76:11
25 | ^^^ help: try this: `&s`
27 error: deref which would be done by auto-deref
28 --> $DIR/explicit_auto_deref.rs:80:13
30 LL | f_str_t(&*s, &*s); // Don't lint second param.
31 | ^^^ help: try this: `&s`
33 error: deref which would be done by auto-deref
34 --> $DIR/explicit_auto_deref.rs:83:24
36 LL | let _: &Box<i32> = &**b;
37 | ^^^^ help: try this: `&b`
39 error: deref which would be done by auto-deref
40 --> $DIR/explicit_auto_deref.rs:89:7
43 | ^^^ help: try this: `&s`
45 error: deref which would be done by auto-deref
46 --> $DIR/explicit_auto_deref.rs:95:9
49 | ^^^^ help: try this: `x`
51 error: deref which would be done by auto-deref
52 --> $DIR/explicit_auto_deref.rs:99:11
55 | ^^^^ help: try this: `x`
57 error: deref which would be done by auto-deref
58 --> $DIR/explicit_auto_deref.rs:103:9
61 | ^^^^^^^^ help: try this: `{ x }`
63 error: deref which would be done by auto-deref
64 --> $DIR/explicit_auto_deref.rs:107:9
67 | ^^^^^ help: try this: `x`
69 error: deref which would be done by auto-deref
70 --> $DIR/explicit_auto_deref.rs:124:12
73 | ^^^ help: try this: `&x`
75 error: deref which would be done by auto-deref
76 --> $DIR/explicit_auto_deref.rs:125:12
79 | ^^^ help: try this: `&x`
81 error: deref which would be done by auto-deref
82 --> $DIR/explicit_auto_deref.rs:126:12
85 | ^^^ help: try this: `&x`
87 error: deref which would be done by auto-deref
88 --> $DIR/explicit_auto_deref.rs:127:27
90 LL | f4.callable_str()(&*x);
91 | ^^^ help: try this: `&x`
93 error: deref which would be done by auto-deref
94 --> $DIR/explicit_auto_deref.rs:128:12
97 | ^^^ help: try this: `&x`
99 error: deref which would be done by auto-deref
100 --> $DIR/explicit_auto_deref.rs:129:12
103 | ^^^ help: try this: `&x`
105 error: deref which would be done by auto-deref
106 --> $DIR/explicit_auto_deref.rs:130:27
108 LL | f7.callable_str()(&*x);
109 | ^^^ help: try this: `&x`
111 error: deref which would be done by auto-deref
112 --> $DIR/explicit_auto_deref.rs:131:25
114 LL | f8.callable_t()(&*x);
115 | ^^^ help: try this: `&x`
117 error: deref which would be done by auto-deref
118 --> $DIR/explicit_auto_deref.rs:132:12
121 | ^^^ help: try this: `&x`
123 error: deref which would be done by auto-deref
124 --> $DIR/explicit_auto_deref.rs:133:13
127 | ^^^ help: try this: `&x`
129 error: deref which would be done by auto-deref
130 --> $DIR/explicit_auto_deref.rs:134:26
132 LL | f11.callable_t()(&*x);
133 | ^^^ help: try this: `&x`
135 error: deref which would be done by auto-deref
136 --> $DIR/explicit_auto_deref.rs:138:16
138 LL | let _ = S1(&*s);
139 | ^^^ help: try this: `&s`
141 error: deref which would be done by auto-deref
142 --> $DIR/explicit_auto_deref.rs:143:21
144 LL | let _ = S2 { s: &*s };
145 | ^^^ help: try this: `&s`
147 error: deref which would be done by auto-deref
148 --> $DIR/explicit_auto_deref.rs:159:30
150 LL | let _ = Self::S1(&**s);
151 | ^^^^ help: try this: `s`
153 error: deref which would be done by auto-deref
154 --> $DIR/explicit_auto_deref.rs:160:35
156 LL | let _ = Self::S2 { s: &**s };
157 | ^^^^ help: try this: `s`
159 error: deref which would be done by auto-deref
160 --> $DIR/explicit_auto_deref.rs:163:20
162 LL | let _ = E1::S1(&*s);
163 | ^^^ help: try this: `&s`
165 error: deref which would be done by auto-deref
166 --> $DIR/explicit_auto_deref.rs:164:25
168 LL | let _ = E1::S2 { s: &*s };
169 | ^^^ help: try this: `&s`
171 error: deref which would be done by auto-deref
172 --> $DIR/explicit_auto_deref.rs:182:13
174 LL | let _ = (*b).foo;
175 | ^^^^ help: try this: `b`
177 error: deref which would be done by auto-deref
178 --> $DIR/explicit_auto_deref.rs:183:13
180 LL | let _ = (**b).foo;
181 | ^^^^^ help: try this: `b`
183 error: deref which would be done by auto-deref
184 --> $DIR/explicit_auto_deref.rs:198:19
186 LL | let _ = f_str(*ref_str);
187 | ^^^^^^^^ help: try this: `ref_str`
189 error: deref which would be done by auto-deref
190 --> $DIR/explicit_auto_deref.rs:200:19
192 LL | let _ = f_str(**ref_ref_str);
193 | ^^^^^^^^^^^^^ help: try this: `ref_ref_str`
195 error: deref which would be done by auto-deref
196 --> $DIR/explicit_auto_deref.rs:210:13
198 LL | f_str(&&*ref_str); // `needless_borrow` will suggest removing both references
199 | ^^^^^^^^ help: try this: `ref_str`
201 error: deref which would be done by auto-deref
202 --> $DIR/explicit_auto_deref.rs:211:12
204 LL | f_str(&&**ref_str); // `needless_borrow` will suggest removing only one reference
205 | ^^^^^^^^^^ help: try this: `ref_str`
207 error: deref which would be done by auto-deref
208 --> $DIR/explicit_auto_deref.rs:220:41
210 LL | let _ = || -> &'static str { return *s };
211 | ^^ help: try this: `s`
213 error: deref which would be done by auto-deref
214 --> $DIR/explicit_auto_deref.rs:239:9
217 | ^^^^ help: try this: `x`
219 error: deref which would be done by auto-deref
220 --> $DIR/explicit_auto_deref.rs:262:8
223 | ^^ help: try this: `x`
225 error: deref which would be done by auto-deref
226 --> $DIR/explicit_auto_deref.rs:265:20
229 | ^^ help: try this: `x`
231 error: deref which would be done by auto-deref
232 --> $DIR/explicit_auto_deref.rs:267:9
235 | ^^ help: try this: `x`
237 error: aborting due to 39 previous errors