]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/explicit_deref_methods.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / explicit_deref_methods.stderr
CommitLineData
cdc7bbd5 1error: explicit `deref` method call
923072b8 2 --> $DIR/explicit_deref_methods.rs:35:19
cdc7bbd5
XL
3 |
4LL | let b: &str = a.deref();
5 | ^^^^^^^^^ help: try this: `&*a`
6 |
7 = note: `-D clippy::explicit-deref-methods` implied by `-D warnings`
8
9error: explicit `deref_mut` method call
923072b8 10 --> $DIR/explicit_deref_methods.rs:37:23
cdc7bbd5
XL
11 |
12LL | let b: &mut str = a.deref_mut();
13 | ^^^^^^^^^^^^^ help: try this: `&mut **a`
14
15error: explicit `deref` method call
923072b8 16 --> $DIR/explicit_deref_methods.rs:40:39
cdc7bbd5
XL
17 |
18LL | let b: String = format!("{}, {}", a.deref(), a.deref());
19 | ^^^^^^^^^ help: try this: `&*a`
20
21error: explicit `deref` method call
923072b8 22 --> $DIR/explicit_deref_methods.rs:40:50
cdc7bbd5
XL
23 |
24LL | let b: String = format!("{}, {}", a.deref(), a.deref());
25 | ^^^^^^^^^ help: try this: `&*a`
26
27error: explicit `deref` method call
923072b8 28 --> $DIR/explicit_deref_methods.rs:42:20
cdc7bbd5
XL
29 |
30LL | println!("{}", a.deref());
31 | ^^^^^^^^^ help: try this: `&*a`
32
33error: explicit `deref` method call
923072b8 34 --> $DIR/explicit_deref_methods.rs:45:11
cdc7bbd5
XL
35 |
36LL | match a.deref() {
37 | ^^^^^^^^^ help: try this: `&*a`
38
39error: explicit `deref` method call
923072b8 40 --> $DIR/explicit_deref_methods.rs:49:28
cdc7bbd5
XL
41 |
42LL | let b: String = concat(a.deref());
43 | ^^^^^^^^^ help: try this: `&*a`
44
45error: explicit `deref` method call
923072b8 46 --> $DIR/explicit_deref_methods.rs:51:13
cdc7bbd5
XL
47 |
48LL | let b = just_return(a).deref();
49 | ^^^^^^^^^^^^^^^^^^^^^^ help: try this: `just_return(a)`
50
51error: explicit `deref` method call
923072b8 52 --> $DIR/explicit_deref_methods.rs:53:28
cdc7bbd5
XL
53 |
54LL | let b: String = concat(just_return(a).deref());
55 | ^^^^^^^^^^^^^^^^^^^^^^ help: try this: `just_return(a)`
56
57error: explicit `deref` method call
923072b8 58 --> $DIR/explicit_deref_methods.rs:55:19
cdc7bbd5
XL
59 |
60LL | let b: &str = a.deref().deref();
61 | ^^^^^^^^^^^^^^^^^ help: try this: `&**a`
62
63error: explicit `deref` method call
923072b8 64 --> $DIR/explicit_deref_methods.rs:58:13
cdc7bbd5
XL
65 |
66LL | let b = opt_a.unwrap().deref();
67 | ^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&*opt_a.unwrap()`
68
69error: explicit `deref` method call
923072b8 70 --> $DIR/explicit_deref_methods.rs:84:31
cdc7bbd5
XL
71 |
72LL | let b: &str = expr_deref!(a.deref());
73 | ^^^^^^^^^ help: try this: `&*a`
74
75error: aborting due to 12 previous errors
76