1 error: implementation of inherent method `to_string(&self) -> String` for type `A`
2 --> $DIR/inherent_to_string.rs:20:5
4 LL | / fn to_string(&self) -> String {
5 LL | | "A.to_string()".to_string()
9 = note: `-D clippy::inherent-to-string` implied by `-D warnings`
10 = help: implement trait `Display` for type `A` instead
12 error: type `C` implements inherent method `to_string(&self) -> String` which shadows the implementation of `Display`
13 --> $DIR/inherent_to_string.rs:44:5
15 LL | / fn to_string(&self) -> String {
16 LL | | "C.to_string()".to_string()
20 note: lint level defined here
21 --> $DIR/inherent_to_string.rs:2:9
23 LL | #![deny(clippy::inherent_to_string_shadow_display)]
24 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25 = help: remove the inherent method from type `C`
27 error: aborting due to 2 previous errors