2022-01-27 03:47:09 +00:00
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:70:19
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
|
LL | let _: &str = &*s;
|
2022-07-06 02:30:36 +00:00
|
|
|
| ^^^ help: try this: `&s`
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
|
= note: `-D clippy::explicit-auto-deref` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:71:19
|
2022-07-05 20:03:51 +00:00
|
|
|
|
|
|
|
|
LL | let _: &str = &*{ String::new() };
|
2022-07-06 02:30:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: try this: `&{ String::new() }`
|
2022-07-05 20:03:51 +00:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:72:19
|
2022-07-06 02:30:36 +00:00
|
|
|
|
|
|
|
|
LL | let _: &str = &mut *{ String::new() };
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&mut { String::new() }`
|
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:76:11
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
|
LL | f_str(&*s);
|
2022-07-06 02:30:36 +00:00
|
|
|
| ^^^ help: try this: `&s`
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:80:13
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
|
LL | f_str_t(&*s, &*s); // Don't lint second param.
|
2022-07-06 02:30:36 +00:00
|
|
|
| ^^^ help: try this: `&s`
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:83:24
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
|
LL | let _: &Box<i32> = &**b;
|
2022-07-06 02:30:36 +00:00
|
|
|
| ^^^^ help: try this: `&b`
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:89:7
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
|
LL | c(&*s);
|
2022-07-06 02:30:36 +00:00
|
|
|
| ^^^ help: try this: `&s`
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:95:9
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
|
LL | &**x
|
|
|
|
| ^^^^ help: try this: `x`
|
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:99:11
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
|
LL | { &**x }
|
|
|
|
| ^^^^ help: try this: `x`
|
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:103:9
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
|
LL | &**{ x }
|
|
|
|
| ^^^^^^^^ help: try this: `{ x }`
|
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:107:9
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
|
LL | &***x
|
|
|
|
| ^^^^^ help: try this: `x`
|
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:124:12
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
|
LL | f1(&*x);
|
2022-07-06 02:30:36 +00:00
|
|
|
| ^^^ help: try this: `&x`
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:125:12
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
|
LL | f2(&*x);
|
2022-07-06 02:30:36 +00:00
|
|
|
| ^^^ help: try this: `&x`
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:126:12
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
|
LL | f3(&*x);
|
2022-07-06 02:30:36 +00:00
|
|
|
| ^^^ help: try this: `&x`
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:127:27
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
|
LL | f4.callable_str()(&*x);
|
2022-07-06 02:30:36 +00:00
|
|
|
| ^^^ help: try this: `&x`
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:128:12
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
|
LL | f5(&*x);
|
2022-07-06 02:30:36 +00:00
|
|
|
| ^^^ help: try this: `&x`
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:129:12
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
|
LL | f6(&*x);
|
2022-07-06 02:30:36 +00:00
|
|
|
| ^^^ help: try this: `&x`
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:130:27
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
|
LL | f7.callable_str()(&*x);
|
2022-07-06 02:30:36 +00:00
|
|
|
| ^^^ help: try this: `&x`
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:131:25
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
|
LL | f8.callable_t()(&*x);
|
2022-07-06 02:30:36 +00:00
|
|
|
| ^^^ help: try this: `&x`
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:132:12
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
|
LL | f9(&*x);
|
2022-07-06 02:30:36 +00:00
|
|
|
| ^^^ help: try this: `&x`
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:133:13
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
|
LL | f10(&*x);
|
2022-07-06 02:30:36 +00:00
|
|
|
| ^^^ help: try this: `&x`
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:134:26
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
|
LL | f11.callable_t()(&*x);
|
2022-07-06 02:30:36 +00:00
|
|
|
| ^^^ help: try this: `&x`
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:138:16
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
|
LL | let _ = S1(&*s);
|
2022-07-06 02:30:36 +00:00
|
|
|
| ^^^ help: try this: `&s`
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:143:21
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
|
LL | let _ = S2 { s: &*s };
|
2022-07-06 02:30:36 +00:00
|
|
|
| ^^^ help: try this: `&s`
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:159:30
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Self::S1(&**s);
|
|
|
|
| ^^^^ help: try this: `s`
|
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:160:35
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Self::S2 { s: &**s };
|
|
|
|
| ^^^^ help: try this: `s`
|
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:163:20
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
|
LL | let _ = E1::S1(&*s);
|
2022-07-06 02:30:36 +00:00
|
|
|
| ^^^ help: try this: `&s`
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:164:25
|
2022-01-27 03:47:09 +00:00
|
|
|
|
|
|
|
|
LL | let _ = E1::S2 { s: &*s };
|
2022-07-06 02:30:36 +00:00
|
|
|
| ^^^ help: try this: `&s`
|
2022-01-27 03:47:09 +00:00
|
|
|
|
2022-01-28 14:12:34 +00:00
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:182:13
|
2022-01-28 14:12:34 +00:00
|
|
|
|
|
|
|
|
LL | let _ = (*b).foo;
|
|
|
|
| ^^^^ help: try this: `b`
|
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:183:13
|
2022-01-28 14:12:34 +00:00
|
|
|
|
|
|
|
|
LL | let _ = (**b).foo;
|
|
|
|
| ^^^^^ help: try this: `b`
|
|
|
|
|
2022-01-28 19:54:28 +00:00
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:198:19
|
2022-01-28 19:54:28 +00:00
|
|
|
|
|
|
|
|
LL | let _ = f_str(*ref_str);
|
|
|
|
| ^^^^^^^^ help: try this: `ref_str`
|
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:200:19
|
2022-01-28 19:54:28 +00:00
|
|
|
|
|
|
|
|
LL | let _ = f_str(**ref_ref_str);
|
|
|
|
| ^^^^^^^^^^^^^ help: try this: `ref_ref_str`
|
|
|
|
|
2022-01-29 14:36:46 +00:00
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:210:13
|
2022-01-29 14:36:46 +00:00
|
|
|
|
|
|
|
|
LL | f_str(&&*ref_str); // `needless_borrow` will suggest removing both references
|
|
|
|
| ^^^^^^^^ help: try this: `ref_str`
|
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:211:12
|
2022-01-29 14:36:46 +00:00
|
|
|
|
|
|
|
|
LL | f_str(&&**ref_str); // `needless_borrow` will suggest removing only one reference
|
|
|
|
| ^^^^^^^^^^ help: try this: `ref_str`
|
|
|
|
|
2022-07-02 04:59:58 +00:00
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:220:41
|
2022-07-02 04:59:58 +00:00
|
|
|
|
|
|
|
|
LL | let _ = || -> &'static str { return *s };
|
|
|
|
| ^^ help: try this: `s`
|
|
|
|
|
2022-07-10 19:04:29 +00:00
|
|
|
error: deref which would be done by auto-deref
|
2022-08-08 14:09:05 +00:00
|
|
|
--> $DIR/explicit_auto_deref.rs:239:9
|
2022-07-10 19:04:29 +00:00
|
|
|
|
|
|
|
|
LL | &**x
|
|
|
|
| ^^^^ help: try this: `x`
|
|
|
|
|
2022-08-08 14:09:05 +00:00
|
|
|
error: deref which would be done by auto-deref
|
|
|
|
--> $DIR/explicit_auto_deref.rs:262:8
|
|
|
|
|
|
|
|
|
LL | c1(*x);
|
|
|
|
| ^^ help: try this: `x`
|
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
|
|
|
--> $DIR/explicit_auto_deref.rs:265:20
|
|
|
|
|
|
|
|
|
LL | return *x;
|
|
|
|
| ^^ help: try this: `x`
|
|
|
|
|
2022-08-08 14:25:05 +00:00
|
|
|
error: deref which would be done by auto-deref
|
|
|
|
--> $DIR/explicit_auto_deref.rs:267:9
|
|
|
|
|
|
|
|
|
LL | *x
|
|
|
|
| ^^ help: try this: `x`
|
|
|
|
|
|
|
|
error: aborting due to 39 previous errors
|
2022-01-27 03:47:09 +00:00
|
|
|
|