summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/explicit_deref_methods.stderr
blob: 4b10ed1377b0dc46f6eaf955bb23cb423542b2ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
error: explicit `deref` method call
  --> $DIR/explicit_deref_methods.rs:36:19
   |
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
  --> $DIR/explicit_deref_methods.rs:38:23
   |
LL |     let b: &mut str = a.deref_mut();
   |                       ^^^^^^^^^^^^^ help: try this: `&mut **a`

error: explicit `deref` method call
  --> $DIR/explicit_deref_methods.rs:41:39
   |
LL |     let b: String = format!("{}, {}", a.deref(), a.deref());
   |                                       ^^^^^^^^^ help: try this: `&*a`

error: explicit `deref` method call
  --> $DIR/explicit_deref_methods.rs:41:50
   |
LL |     let b: String = format!("{}, {}", a.deref(), a.deref());
   |                                                  ^^^^^^^^^ help: try this: `&*a`

error: explicit `deref` method call
  --> $DIR/explicit_deref_methods.rs:43:20
   |
LL |     println!("{}", a.deref());
   |                    ^^^^^^^^^ help: try this: `&*a`

error: explicit `deref` method call
  --> $DIR/explicit_deref_methods.rs:46:11
   |
LL |     match a.deref() {
   |           ^^^^^^^^^ help: try this: `&*a`

error: explicit `deref` method call
  --> $DIR/explicit_deref_methods.rs:50:28
   |
LL |     let b: String = concat(a.deref());
   |                            ^^^^^^^^^ help: try this: `&*a`

error: explicit `deref` method call
  --> $DIR/explicit_deref_methods.rs:52:13
   |
LL |     let b = just_return(a).deref();
   |             ^^^^^^^^^^^^^^^^^^^^^^ help: try this: `just_return(a)`

error: explicit `deref` method call
  --> $DIR/explicit_deref_methods.rs:54:28
   |
LL |     let b: String = concat(just_return(a).deref());
   |                            ^^^^^^^^^^^^^^^^^^^^^^ help: try this: `just_return(a)`

error: explicit `deref` method call
  --> $DIR/explicit_deref_methods.rs:56:19
   |
LL |     let b: &str = a.deref().deref();
   |                   ^^^^^^^^^^^^^^^^^ help: try this: `&**a`

error: explicit `deref` method call
  --> $DIR/explicit_deref_methods.rs:59:13
   |
LL |     let b = opt_a.unwrap().deref();
   |             ^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&*opt_a.unwrap()`

error: explicit `deref` method call
  --> $DIR/explicit_deref_methods.rs:85:31
   |
LL |     let b: &str = expr_deref!(a.deref());
   |                               ^^^^^^^^^ help: try this: `&*a`

error: aborting due to 12 previous errors