2021-03-25 13:29:11 -05:00
|
|
|
error: explicit `deref` method call
|
2022-06-04 06:34:07 -05:00
|
|
|
--> $DIR/explicit_deref_methods.rs:35:19
|
2021-03-25 13:29:11 -05:00
|
|
|
|
|
|
|
|
LL | let b: &str = a.deref();
|
|
|
|
| ^^^^^^^^^ help: try this: `&*a`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::explicit-deref-methods` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: explicit `deref_mut` method call
|
2022-06-04 06:34:07 -05:00
|
|
|
--> $DIR/explicit_deref_methods.rs:37:23
|
2021-03-25 13:29:11 -05:00
|
|
|
|
|
|
|
|
LL | let b: &mut str = a.deref_mut();
|
|
|
|
| ^^^^^^^^^^^^^ help: try this: `&mut **a`
|
|
|
|
|
|
|
|
error: explicit `deref` method call
|
2022-06-04 06:34:07 -05:00
|
|
|
--> $DIR/explicit_deref_methods.rs:40:39
|
2021-03-25 13:29:11 -05:00
|
|
|
|
|
|
|
|
LL | let b: String = format!("{}, {}", a.deref(), a.deref());
|
|
|
|
| ^^^^^^^^^ help: try this: `&*a`
|
|
|
|
|
|
|
|
error: explicit `deref` method call
|
2022-06-04 06:34:07 -05:00
|
|
|
--> $DIR/explicit_deref_methods.rs:40:50
|
2021-03-25 13:29:11 -05:00
|
|
|
|
|
|
|
|
LL | let b: String = format!("{}, {}", a.deref(), a.deref());
|
|
|
|
| ^^^^^^^^^ help: try this: `&*a`
|
|
|
|
|
|
|
|
error: explicit `deref` method call
|
2022-06-04 06:34:07 -05:00
|
|
|
--> $DIR/explicit_deref_methods.rs:42:20
|
2021-03-25 13:29:11 -05:00
|
|
|
|
|
|
|
|
LL | println!("{}", a.deref());
|
|
|
|
| ^^^^^^^^^ help: try this: `&*a`
|
|
|
|
|
|
|
|
error: explicit `deref` method call
|
2022-06-04 06:34:07 -05:00
|
|
|
--> $DIR/explicit_deref_methods.rs:45:11
|
2021-03-25 13:29:11 -05:00
|
|
|
|
|
|
|
|
LL | match a.deref() {
|
|
|
|
| ^^^^^^^^^ help: try this: `&*a`
|
|
|
|
|
|
|
|
error: explicit `deref` method call
|
2022-06-04 06:34:07 -05:00
|
|
|
--> $DIR/explicit_deref_methods.rs:49:28
|
2021-03-25 13:29:11 -05:00
|
|
|
|
|
|
|
|
LL | let b: String = concat(a.deref());
|
|
|
|
| ^^^^^^^^^ help: try this: `&*a`
|
|
|
|
|
|
|
|
error: explicit `deref` method call
|
2022-06-04 06:34:07 -05:00
|
|
|
--> $DIR/explicit_deref_methods.rs:51:13
|
2021-03-25 13:29:11 -05:00
|
|
|
|
|
|
|
|
LL | let b = just_return(a).deref();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: try this: `just_return(a)`
|
|
|
|
|
|
|
|
error: explicit `deref` method call
|
2022-06-04 06:34:07 -05:00
|
|
|
--> $DIR/explicit_deref_methods.rs:53:28
|
2021-03-25 13:29:11 -05:00
|
|
|
|
|
|
|
|
LL | let b: String = concat(just_return(a).deref());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: try this: `just_return(a)`
|
|
|
|
|
|
|
|
error: explicit `deref` method call
|
2022-06-04 06:34:07 -05:00
|
|
|
--> $DIR/explicit_deref_methods.rs:55:19
|
2021-03-25 13:29:11 -05:00
|
|
|
|
|
|
|
|
LL | let b: &str = a.deref().deref();
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try this: `&**a`
|
|
|
|
|
|
|
|
error: explicit `deref` method call
|
2022-06-04 06:34:07 -05:00
|
|
|
--> $DIR/explicit_deref_methods.rs:58:13
|
2021-03-25 13:29:11 -05:00
|
|
|
|
|
|
|
|
LL | let b = opt_a.unwrap().deref();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&*opt_a.unwrap()`
|
|
|
|
|
|
|
|
error: explicit `deref` method call
|
2022-06-04 06:34:07 -05:00
|
|
|
--> $DIR/explicit_deref_methods.rs:84:31
|
2021-03-25 13:29:11 -05:00
|
|
|
|
|
|
|
|
LL | let b: &str = expr_deref!(a.deref());
|
|
|
|
| ^^^^^^^^^ help: try this: `&*a`
|
|
|
|
|
|
|
|
error: aborting due to 12 previous errors
|
|
|
|
|