2021-03-02 18:32:56 +00:00
|
|
|
error: explicit `deref` method call
|
2023-06-01 04:33:30 +00:00
|
|
|
--> $DIR/explicit_deref_methods.rs:53:19
|
2018-10-03 16:53:39 +00:00
|
|
|
|
|
2020-01-23 15:28:01 +00:00
|
|
|
LL | let b: &str = a.deref();
|
|
|
|
| ^^^^^^^^^ help: try this: `&*a`
|
2018-10-03 16:53:39 +00:00
|
|
|
|
|
2020-03-07 14:33:27 +00:00
|
|
|
= note: `-D clippy::explicit-deref-methods` implied by `-D warnings`
|
2018-10-03 16:53:39 +00:00
|
|
|
|
2021-03-13 01:13:45 +00:00
|
|
|
error: explicit `deref_mut` method call
|
2023-06-01 04:33:30 +00:00
|
|
|
--> $DIR/explicit_deref_methods.rs:55:23
|
2018-10-03 16:53:39 +00:00
|
|
|
|
|
2020-01-23 15:28:01 +00:00
|
|
|
LL | let b: &mut str = a.deref_mut();
|
2021-03-02 18:32:56 +00:00
|
|
|
| ^^^^^^^^^^^^^ help: try this: `&mut **a`
|
2018-10-03 16:53:39 +00:00
|
|
|
|
2021-03-02 18:32:56 +00:00
|
|
|
error: explicit `deref` method call
|
2023-06-01 04:33:30 +00:00
|
|
|
--> $DIR/explicit_deref_methods.rs:58:39
|
2018-10-03 16:53:39 +00:00
|
|
|
|
|
2020-01-26 18:48:30 +00:00
|
|
|
LL | let b: String = format!("{}, {}", a.deref(), a.deref());
|
|
|
|
| ^^^^^^^^^ help: try this: `&*a`
|
2018-10-03 16:53:39 +00:00
|
|
|
|
2021-03-02 18:32:56 +00:00
|
|
|
error: explicit `deref` method call
|
2023-06-01 04:33:30 +00:00
|
|
|
--> $DIR/explicit_deref_methods.rs:58:50
|
2018-10-03 16:53:39 +00:00
|
|
|
|
|
2020-01-26 18:48:30 +00:00
|
|
|
LL | let b: String = format!("{}, {}", a.deref(), a.deref());
|
|
|
|
| ^^^^^^^^^ help: try this: `&*a`
|
2018-10-03 16:53:39 +00:00
|
|
|
|
2021-03-02 18:32:56 +00:00
|
|
|
error: explicit `deref` method call
|
2023-06-01 04:33:30 +00:00
|
|
|
--> $DIR/explicit_deref_methods.rs:60:20
|
2018-10-03 16:53:39 +00:00
|
|
|
|
|
2020-01-26 18:48:30 +00:00
|
|
|
LL | println!("{}", a.deref());
|
|
|
|
| ^^^^^^^^^ help: try this: `&*a`
|
2018-10-03 16:53:39 +00:00
|
|
|
|
2021-03-02 18:32:56 +00:00
|
|
|
error: explicit `deref` method call
|
2023-06-01 04:33:30 +00:00
|
|
|
--> $DIR/explicit_deref_methods.rs:63:11
|
2018-10-03 16:53:39 +00:00
|
|
|
|
|
2020-01-26 18:48:30 +00:00
|
|
|
LL | match a.deref() {
|
|
|
|
| ^^^^^^^^^ help: try this: `&*a`
|
2018-10-03 16:53:39 +00:00
|
|
|
|
2021-03-02 18:32:56 +00:00
|
|
|
error: explicit `deref` method call
|
2023-06-01 04:33:30 +00:00
|
|
|
--> $DIR/explicit_deref_methods.rs:67:28
|
2018-10-03 16:53:39 +00:00
|
|
|
|
|
2020-01-26 18:48:30 +00:00
|
|
|
LL | let b: String = concat(a.deref());
|
|
|
|
| ^^^^^^^^^ help: try this: `&*a`
|
2018-10-03 16:53:39 +00:00
|
|
|
|
2021-03-02 18:32:56 +00:00
|
|
|
error: explicit `deref` method call
|
2023-06-01 04:33:30 +00:00
|
|
|
--> $DIR/explicit_deref_methods.rs:69:13
|
2020-03-07 14:33:27 +00:00
|
|
|
|
|
|
|
|
LL | let b = just_return(a).deref();
|
2021-03-02 18:32:56 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: try this: `just_return(a)`
|
2020-03-07 14:33:27 +00:00
|
|
|
|
2021-03-02 18:32:56 +00:00
|
|
|
error: explicit `deref` method call
|
2023-06-01 04:33:30 +00:00
|
|
|
--> $DIR/explicit_deref_methods.rs:71:28
|
2020-03-07 14:33:27 +00:00
|
|
|
|
|
|
|
|
LL | let b: String = concat(just_return(a).deref());
|
2021-03-02 18:32:56 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: try this: `just_return(a)`
|
2020-03-07 14:33:27 +00:00
|
|
|
|
2021-03-02 18:32:56 +00:00
|
|
|
error: explicit `deref` method call
|
2023-06-01 04:33:30 +00:00
|
|
|
--> $DIR/explicit_deref_methods.rs:73:19
|
2020-03-07 14:33:27 +00:00
|
|
|
|
|
|
|
|
LL | let b: &str = a.deref().deref();
|
2021-03-02 18:32:56 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try this: `&**a`
|
2020-03-07 14:33:27 +00:00
|
|
|
|
2021-03-02 18:32:56 +00:00
|
|
|
error: explicit `deref` method call
|
2023-06-01 04:33:30 +00:00
|
|
|
--> $DIR/explicit_deref_methods.rs:76:13
|
2020-03-07 14:33:27 +00:00
|
|
|
|
|
|
|
|
LL | let b = opt_a.unwrap().deref();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&*opt_a.unwrap()`
|
|
|
|
|
2021-03-13 13:27:42 +00:00
|
|
|
error: explicit `deref` method call
|
2023-06-01 19:29:56 +00:00
|
|
|
--> $DIR/explicit_deref_methods.rs:113:31
|
2021-03-13 13:27:42 +00:00
|
|
|
|
|
|
|
|
LL | let b: &str = expr_deref!(a.deref());
|
|
|
|
| ^^^^^^^^^ help: try this: `&*a`
|
|
|
|
|
2023-06-01 19:29:56 +00:00
|
|
|
error: aborting due to 12 previous errors
|
2018-10-03 16:53:39 +00:00
|
|
|
|