2021-03-25 18:29:11 +00:00
|
|
|
error: explicit `deref` method call
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/explicit_deref_methods.rs:54:19
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
|
LL | let b: &str = a.deref();
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^ help: try: `&*a`
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
|
= note: `-D clippy::explicit-deref-methods` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::explicit_deref_methods)]`
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
error: explicit `deref_mut` method call
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/explicit_deref_methods.rs:56:23
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
|
LL | let b: &mut str = a.deref_mut();
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^ help: try: `&mut **a`
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
error: explicit `deref` method call
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/explicit_deref_methods.rs:59:39
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
|
LL | let b: String = format!("{}, {}", a.deref(), a.deref());
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^ help: try: `&*a`
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
error: explicit `deref` method call
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/explicit_deref_methods.rs:59:50
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
|
LL | let b: String = format!("{}, {}", a.deref(), a.deref());
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^ help: try: `&*a`
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
error: explicit `deref` method call
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/explicit_deref_methods.rs:61:20
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
|
LL | println!("{}", a.deref());
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^ help: try: `&*a`
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
error: explicit `deref` method call
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/explicit_deref_methods.rs:64:11
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
|
LL | match a.deref() {
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^ help: try: `&*a`
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
error: explicit `deref` method call
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/explicit_deref_methods.rs:68:28
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
|
LL | let b: String = concat(a.deref());
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^ help: try: `&*a`
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
error: explicit `deref` method call
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/explicit_deref_methods.rs:70:13
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
|
LL | let b = just_return(a).deref();
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: try: `just_return(a)`
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
error: explicit `deref` method call
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/explicit_deref_methods.rs:72:28
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
|
LL | let b: String = concat(just_return(a).deref());
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: try: `just_return(a)`
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
error: explicit `deref` method call
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/explicit_deref_methods.rs:74:19
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
|
LL | let b: &str = a.deref().deref();
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try: `&**a`
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
error: explicit `deref` method call
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/explicit_deref_methods.rs:77:13
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
|
LL | let b = opt_a.unwrap().deref();
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*opt_a.unwrap()`
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
error: explicit `deref` method call
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/explicit_deref_methods.rs:114:31
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
|
LL | let b: &str = expr_deref!(a.deref());
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^ help: try: `&*a`
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
error: aborting due to 12 previous errors
|
|
|
|
|