2019-07-15 11:43:47 -05:00
|
|
|
error: implementation of inherent method `to_string(&self) -> String` for type `A`
|
2019-08-27 14:23:26 -05:00
|
|
|
--> $DIR/inherent_to_string.rs:20:5
|
2019-07-06 13:13:38 -05:00
|
|
|
|
|
|
|
|
LL | / fn to_string(&self) -> String {
|
|
|
|
LL | | "A.to_string()".to_string()
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::inherent-to-string` implied by `-D warnings`
|
2019-07-15 11:43:47 -05:00
|
|
|
= help: implement trait `Display` for type `A` instead
|
2019-07-06 13:13:38 -05:00
|
|
|
|
2019-07-15 11:43:47 -05:00
|
|
|
error: type `C` implements inherent method `to_string(&self) -> String` which shadows the implementation of `Display`
|
2019-08-27 14:23:26 -05:00
|
|
|
--> $DIR/inherent_to_string.rs:44:5
|
2019-07-06 13:13:38 -05:00
|
|
|
|
|
|
|
|
LL | / fn to_string(&self) -> String {
|
|
|
|
LL | | "C.to_string()".to_string()
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
2019-07-16 11:29:37 -05:00
|
|
|
note: lint level defined here
|
2019-07-15 11:43:47 -05:00
|
|
|
--> $DIR/inherent_to_string.rs:2:9
|
|
|
|
|
|
2019-07-16 11:29:37 -05:00
|
|
|
LL | #![deny(clippy::inherent_to_string_shadow_display)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
= help: remove the inherent method from type `C`
|
2019-07-15 11:43:47 -05:00
|
|
|
|
2019-07-16 11:29:37 -05:00
|
|
|
error: aborting due to 2 previous errors
|
2019-07-06 13:13:38 -05:00
|
|
|
|