]> git.lizzy.rs Git - rust.git/blob - tests/ui/dereference.stderr
Working basic dereference clip
[rust.git] / tests / ui / dereference.stderr
1 error: explicit deref method call
2   --> $DIR/dereference.rs:13:23
3    |
4 13 |         let b: &str = a.deref();
5    |                       ^^^^^^^^^ help: try this: `&*a`
6    |
7    = note: `-D clippy::explicit-deref-method` implied by `-D warnings`
8
9 error: explicit deref_mut method call
10   --> $DIR/dereference.rs:17:27
11    |
12 17 |         let b: &mut str = a.deref_mut();
13    |                           ^^^^^^^^^^^^^ help: try this: `&mut *a`
14
15 error: explicit deref method call
16   --> $DIR/dereference.rs:21:25
17    |
18 21 |         let b: String = a.deref().clone();
19    |                         ^^^^^^^^^ help: try this: `&*a`
20
21 error: explicit deref_mut method call
22   --> $DIR/dereference.rs:25:24
23    |
24 25 |         let b: usize = a.deref_mut().len();
25    |                        ^^^^^^^^^^^^^ help: try this: `&mut *a`
26
27 error: explicit deref method call
28   --> $DIR/dereference.rs:29:26
29    |
30 29 |         let b: &usize = &a.deref().len();
31    |                          ^^^^^^^^^ help: try this: `&*a`
32
33 error: explicit deref method call
34   --> $DIR/dereference.rs:34:23
35    |
36 34 |         let b: &str = a.deref().deref();
37    |                       ^^^^^^^^^ help: try this: `&*a`
38
39 error: explicit deref method call
40   --> $DIR/dereference.rs:39:43
41    |
42 39 |         let b: String = format!("{}, {}", a.deref(), a.deref());
43    |                                           ^^^^^^^^^ help: try this: `&*a`
44
45 error: explicit deref method call
46   --> $DIR/dereference.rs:39:54
47    |
48 39 |         let b: String = format!("{}, {}", a.deref(), a.deref());
49    |                                                      ^^^^^^^^^ help: try this: `&*a`
50
51 error: aborting due to 8 previous errors
52