rust/tests/ui/dereference.stderr

53 lines
1.6 KiB
Text
Raw Normal View History

2018-10-03 18:53:39 +02:00
error: explicit deref method call
--> $DIR/dereference.rs:13:23
|
13 | let b: &str = a.deref();
| ^^^^^^^^^ help: try this: `&*a`
|
= note: `-D clippy::explicit-deref-method` implied by `-D warnings`
error: explicit deref_mut method call
--> $DIR/dereference.rs:17:27
|
17 | let b: &mut str = a.deref_mut();
| ^^^^^^^^^^^^^ help: try this: `&mut *a`
error: explicit deref method call
--> $DIR/dereference.rs:21:25
|
21 | let b: String = a.deref().clone();
| ^^^^^^^^^ help: try this: `&*a`
error: explicit deref_mut method call
--> $DIR/dereference.rs:25:24
|
25 | let b: usize = a.deref_mut().len();
| ^^^^^^^^^^^^^ help: try this: `&mut *a`
error: explicit deref method call
--> $DIR/dereference.rs:29:26
|
29 | let b: &usize = &a.deref().len();
| ^^^^^^^^^ help: try this: `&*a`
error: explicit deref method call
--> $DIR/dereference.rs:34:23
|
34 | let b: &str = a.deref().deref();
| ^^^^^^^^^ help: try this: `&*a`
error: explicit deref method call
--> $DIR/dereference.rs:39:43
|
39 | let b: String = format!("{}, {}", a.deref(), a.deref());
| ^^^^^^^^^ help: try this: `&*a`
error: explicit deref method call
--> $DIR/dereference.rs:39:54
|
39 | let b: String = format!("{}, {}", a.deref(), a.deref());
| ^^^^^^^^^ help: try this: `&*a`
error: aborting due to 8 previous errors