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