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