2022-06-30 03:50:09 -05:00
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:69:19
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | let _: &str = &*s;
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^ help: try: `&s`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
= note: `-D clippy::explicit-auto-deref` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::explicit_auto_deref)]`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:70:19
|
2022-08-11 12:42:16 -05:00
|
|
|
|
|
|
|
|
LL | let _: &str = &*{ String::new() };
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: try: `&{ String::new() }`
|
2022-08-11 12:42:16 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:71:19
|
2022-08-11 12:42:16 -05:00
|
|
|
|
|
|
|
|
LL | let _: &str = &mut *{ String::new() };
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&mut { String::new() }`
|
2022-08-11 12:42:16 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:75:11
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | f_str(&*s);
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^ help: try: `&s`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:79:13
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | f_str_t(&*s, &*s); // Don't lint second param.
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^ help: try: `&s`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:82:24
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | let _: &Box<i32> = &**b;
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^ help: try: `&b`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:88:7
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | c(&*s);
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^ help: try: `&s`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:94:9
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | &**x
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^ help: try: `x`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:98:11
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | { &**x }
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^ help: try: `x`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:102:9
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | &**{ x }
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^^^^^ help: try: `{ x }`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:106:9
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | &***x
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^^ help: try: `x`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:123:12
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | f1(&*x);
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^ help: try: `&x`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:124:12
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | f2(&*x);
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^ help: try: `&x`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:125:12
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | f3(&*x);
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^ help: try: `&x`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:126:27
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | f4.callable_str()(&*x);
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^ help: try: `&x`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:127:12
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | f5(&*x);
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^ help: try: `&x`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:128:12
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | f6(&*x);
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^ help: try: `&x`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:129:27
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | f7.callable_str()(&*x);
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^ help: try: `&x`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:130:25
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | f8.callable_t()(&*x);
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^ help: try: `&x`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:131:12
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | f9(&*x);
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^ help: try: `&x`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:132:13
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | f10(&*x);
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^ help: try: `&x`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:133:26
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | f11.callable_t()(&*x);
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^ help: try: `&x`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:137:16
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | let _ = S1(&*s);
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^ help: try: `&s`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:142:21
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | let _ = S2 { s: &*s };
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^ help: try: `&s`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:158:30
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | let _ = Self::S1(&**s);
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^ help: try: `s`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:159:35
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | let _ = Self::S2 { s: &**s };
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^ help: try: `s`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:162:20
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | let _ = E1::S1(&*s);
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^ help: try: `&s`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:163:25
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | let _ = E1::S2 { s: &*s };
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^ help: try: `&s`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:181:13
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | let _ = (*b).foo;
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^ help: try: `b`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:182:13
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | let _ = (**b).foo;
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^^ help: try: `b`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:197:19
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | let _ = f_str(*ref_str);
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^^^^^ help: try: `ref_str`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:199:19
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | let _ = f_str(**ref_ref_str);
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^^^^^^^^^^ help: try: `ref_ref_str`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:209:12
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | f_str(&&*ref_str); // `needless_borrow` will suggest removing both references
|
2023-09-12 11:13:53 -05:00
|
|
|
| ^^^^^^^^^ help: try: `ref_str`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:210:12
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
|
LL | f_str(&&**ref_str); // `needless_borrow` will suggest removing only one reference
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^^^^^^^ help: try: `ref_str`
|
2022-06-30 03:50:09 -05:00
|
|
|
|
2022-07-18 02:39:37 -05:00
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:219:41
|
2022-07-18 02:39:37 -05:00
|
|
|
|
|
|
|
|
LL | let _ = || -> &'static str { return *s };
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^ help: try: `s`
|
2022-07-18 02:39:37 -05:00
|
|
|
|
2022-08-11 12:42:16 -05:00
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:238:9
|
2022-08-11 12:42:16 -05:00
|
|
|
|
|
|
|
|
LL | &**x
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^ help: try: `x`
|
2022-08-11 12:42:16 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:261:8
|
2022-08-11 12:42:16 -05:00
|
|
|
|
|
|
|
|
LL | c1(*x);
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^ help: try: `x`
|
2022-08-11 12:42:16 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:264:20
|
2022-08-11 12:42:16 -05:00
|
|
|
|
|
|
|
|
LL | return *x;
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^ help: try: `x`
|
2022-08-11 12:42:16 -05:00
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:266:9
|
2022-08-11 12:42:16 -05:00
|
|
|
|
|
|
|
|
LL | *x
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^ help: try: `x`
|
2022-08-11 12:42:16 -05:00
|
|
|
|
2023-09-12 11:13:53 -05:00
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:300:20
|
2023-09-12 11:13:53 -05:00
|
|
|
|
|
|
|
|
LL | Some(x) => &mut *x,
|
|
|
|
| ^^^^^^^ help: try: `x`
|
|
|
|
|
2023-11-16 12:13:24 -06:00
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:333:22
|
2023-11-16 12:13:24 -06:00
|
|
|
|
|
|
|
|
LL | let _ = &mut (*{ x.u }).x;
|
|
|
|
| ^^^^^^^^^^ help: try: `{ x.u }`
|
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:339:22
|
2023-11-16 12:13:24 -06:00
|
|
|
|
|
|
|
|
LL | let _ = &mut (**x.u).x;
|
|
|
|
| ^^^^^^^ help: try: `(*x.u)`
|
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:340:22
|
2023-11-16 12:13:24 -06:00
|
|
|
|
|
|
|
|
LL | let _ = &mut (**{ x.u }).x;
|
|
|
|
| ^^^^^^^^^^^ help: try: `{ x.u }`
|
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:344:22
|
2023-11-16 12:13:24 -06:00
|
|
|
|
|
|
|
|
LL | let _ = &mut (*x.u).x;
|
|
|
|
| ^^^^^^ help: try: `x.u`
|
|
|
|
|
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:345:22
|
2023-11-16 12:13:24 -06:00
|
|
|
|
|
|
|
|
LL | let _ = &mut (*{ x.u }).x;
|
|
|
|
| ^^^^^^^^^^ help: try: `{ x.u }`
|
|
|
|
|
2024-07-11 08:44:03 -05:00
|
|
|
error: deref which would be done by auto-deref
|
2024-10-03 09:32:51 -05:00
|
|
|
--> tests/ui/explicit_auto_deref.rs:368:13
|
2024-07-11 08:44:03 -05:00
|
|
|
|
|
|
|
|
LL | foo(&*wrapped_bar);
|
|
|
|
| ^^^^^^^^^^^^^ help: try: `&wrapped_bar`
|
|
|
|
|
|
|
|
error: aborting due to 46 previous errors
|
2022-06-30 03:50:09 -05:00
|
|
|
|