2021-03-02 12:32:56 -06:00
|
|
|
error: explicit `deref` method call
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/explicit_deref_methods.rs:54:19
|
2018-10-03 11:53:39 -05:00
|
|
|
|
|
2020-01-23 09:28:01 -06:00
|
|
|
LL | let b: &str = a.deref();
|
2023-07-01 06:08:01 -05:00
|
|
|
| ^^^^^^^^^ help: try: `&*a`
|
2018-10-03 11:53:39 -05:00
|
|
|
|
|
2020-03-07 08:33:27 -06:00
|
|
|
= note: `-D clippy::explicit-deref-methods` implied by `-D warnings`
|
2018-10-03 11:53:39 -05:00
|
|
|
|
2021-03-12 19:13:45 -06:00
|
|
|
error: explicit `deref_mut` method call
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/explicit_deref_methods.rs:56:23
|
2018-10-03 11:53:39 -05:00
|
|
|
|
|
2020-01-23 09:28:01 -06:00
|
|
|
LL | let b: &mut str = a.deref_mut();
|
2023-07-01 06:08:01 -05:00
|
|
|
| ^^^^^^^^^^^^^ help: try: `&mut **a`
|
2018-10-03 11:53:39 -05:00
|
|
|
|
2021-03-02 12:32:56 -06:00
|
|
|
error: explicit `deref` method call
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/explicit_deref_methods.rs:59:39
|
2018-10-03 11:53:39 -05:00
|
|
|
|
|
2020-01-26 12:48:30 -06:00
|
|
|
LL | let b: String = format!("{}, {}", a.deref(), a.deref());
|
2023-07-01 06:08:01 -05:00
|
|
|
| ^^^^^^^^^ help: try: `&*a`
|
2018-10-03 11:53:39 -05:00
|
|
|
|
2021-03-02 12:32:56 -06:00
|
|
|
error: explicit `deref` method call
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/explicit_deref_methods.rs:59:50
|
2018-10-03 11:53:39 -05:00
|
|
|
|
|
2020-01-26 12:48:30 -06:00
|
|
|
LL | let b: String = format!("{}, {}", a.deref(), a.deref());
|
2023-07-01 06:08:01 -05:00
|
|
|
| ^^^^^^^^^ help: try: `&*a`
|
2018-10-03 11:53:39 -05:00
|
|
|
|
2021-03-02 12:32:56 -06:00
|
|
|
error: explicit `deref` method call
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/explicit_deref_methods.rs:61:20
|
2018-10-03 11:53:39 -05:00
|
|
|
|
|
2020-01-26 12:48:30 -06:00
|
|
|
LL | println!("{}", a.deref());
|
2023-07-01 06:08:01 -05:00
|
|
|
| ^^^^^^^^^ help: try: `&*a`
|
2018-10-03 11:53:39 -05:00
|
|
|
|
2021-03-02 12:32:56 -06:00
|
|
|
error: explicit `deref` method call
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/explicit_deref_methods.rs:64:11
|
2018-10-03 11:53:39 -05:00
|
|
|
|
|
2020-01-26 12:48:30 -06:00
|
|
|
LL | match a.deref() {
|
2023-07-01 06:08:01 -05:00
|
|
|
| ^^^^^^^^^ help: try: `&*a`
|
2018-10-03 11:53:39 -05:00
|
|
|
|
2021-03-02 12:32:56 -06:00
|
|
|
error: explicit `deref` method call
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/explicit_deref_methods.rs:68:28
|
2018-10-03 11:53:39 -05:00
|
|
|
|
|
2020-01-26 12:48:30 -06:00
|
|
|
LL | let b: String = concat(a.deref());
|
2023-07-01 06:08:01 -05:00
|
|
|
| ^^^^^^^^^ help: try: `&*a`
|
2018-10-03 11:53:39 -05:00
|
|
|
|
2021-03-02 12:32:56 -06:00
|
|
|
error: explicit `deref` method call
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/explicit_deref_methods.rs:70:13
|
2020-03-07 08:33:27 -06:00
|
|
|
|
|
|
|
|
LL | let b = just_return(a).deref();
|
2023-07-01 06:08:01 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: try: `just_return(a)`
|
2020-03-07 08:33:27 -06:00
|
|
|
|
2021-03-02 12:32:56 -06:00
|
|
|
error: explicit `deref` method call
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/explicit_deref_methods.rs:72:28
|
2020-03-07 08:33:27 -06:00
|
|
|
|
|
|
|
|
LL | let b: String = concat(just_return(a).deref());
|
2023-07-01 06:08:01 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: try: `just_return(a)`
|
2020-03-07 08:33:27 -06:00
|
|
|
|
2021-03-02 12:32:56 -06:00
|
|
|
error: explicit `deref` method call
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/explicit_deref_methods.rs:74:19
|
2020-03-07 08:33:27 -06:00
|
|
|
|
|
|
|
|
LL | let b: &str = a.deref().deref();
|
2023-07-01 06:08:01 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try: `&**a`
|
2020-03-07 08:33:27 -06:00
|
|
|
|
2021-03-02 12:32:56 -06:00
|
|
|
error: explicit `deref` method call
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/explicit_deref_methods.rs:77:13
|
2020-03-07 08:33:27 -06:00
|
|
|
|
|
|
|
|
LL | let b = opt_a.unwrap().deref();
|
2023-07-01 06:08:01 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*opt_a.unwrap()`
|
2020-03-07 08:33:27 -06:00
|
|
|
|
2021-03-13 07:27:42 -06:00
|
|
|
error: explicit `deref` method call
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/explicit_deref_methods.rs:114:31
|
2021-03-13 07:27:42 -06:00
|
|
|
|
|
|
|
|
LL | let b: &str = expr_deref!(a.deref());
|
2023-07-01 06:08:01 -05:00
|
|
|
| ^^^^^^^^^ help: try: `&*a`
|
2021-03-13 07:27:42 -06:00
|
|
|
|
2023-06-01 14:29:56 -05:00
|
|
|
error: aborting due to 12 previous errors
|
2018-10-03 11:53:39 -05:00
|
|
|
|