]> git.lizzy.rs Git - rust.git/blob - tests/ui/dereference.stderr
Global rework + fix imports
[rust.git] / tests / ui / dereference.stderr
1 error: explicit deref method call
2   --> $DIR/dereference.rs:10:19
3    |
4 LL |     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:12: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:14:21
17    |
18 LL |     let b: String = a.deref().clone();
19    |                     ^^^^^^^^^ help: try this: `&*a`
20
21 error: explicit deref_mut method call
22   --> $DIR/dereference.rs:16:20
23    |
24 LL |     let b: usize = a.deref_mut().len();
25    |                    ^^^^^^^^^^^^^ help: try this: `&mut *a`
26
27 error: explicit deref method call
28   --> $DIR/dereference.rs:18:22
29    |
30 LL |     let b: &usize = &a.deref().len();
31    |                      ^^^^^^^^^ help: try this: `&*a`
32
33 error: explicit deref method call
34   --> $DIR/dereference.rs:21:19
35    |
36 LL |     let b: &str = a.deref().deref();
37    |                   ^^^^^^^^^ help: try this: `&*a`
38
39 error: explicit deref method call
40   --> $DIR/dereference.rs:24:39
41    |
42 LL |     let b: String = format!("{}, {}", a.deref(), a.deref());
43    |                                       ^^^^^^^^^ help: try this: `&*a`
44
45 error: explicit deref method call
46   --> $DIR/dereference.rs:24:50
47    |
48 LL |     let b: String = format!("{}, {}", a.deref(), a.deref());
49    |                                                  ^^^^^^^^^ help: try this: `&*a`
50
51 error: aborting due to 8 previous errors
52