]> git.lizzy.rs Git - rust.git/blob - tests/ui/inherent_to_string.stderr
Corrections for PR review.
[rust.git] / tests / ui / inherent_to_string.stderr
1 error: implementation of inherent method `to_string(&self) -> String` for type `A`
2   --> $DIR/inherent_to_string.rs:18:5
3    |
4 LL | /     fn to_string(&self) -> String {
5 LL | |         "A.to_string()".to_string()
6 LL | |     }
7    | |_____^
8    |
9    = note: `-D clippy::inherent-to-string` implied by `-D warnings`
10    = help: implement trait `Display` for type `A` instead
11
12 error: type `C` implements inherent method `to_string(&self) -> String` which shadows the implementation of `Display`
13   --> $DIR/inherent_to_string.rs:42:5
14    |
15 LL | /     fn to_string(&self) -> String {
16 LL | |         "C.to_string()".to_string()
17 LL | |     }
18    | |_____^
19    |
20    = note: #[deny(clippy::inherent_to_string_shadow_display)] on by default
21    = help: remove the inherent method from type `C`
22
23 error: unknown clippy lint: clippy::inherent_to_string_shadow
24   --> $DIR/inherent_to_string.rs:2:9
25    |
26 LL | #![deny(clippy::inherent_to_string_shadow)]
27    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
28    |
29    = note: `-D clippy::unknown-clippy-lints` implied by `-D warnings`
30
31 error: aborting due to 3 previous errors
32