rust/tests/ui/inherent_to_string.stderr

25 lines
809 B
Plaintext
Raw Normal View History

error: implementation of inherent method 'to_string() -> String' for type 'A'
--> $DIR/inherent_to_string.rs:18:5
|
LL | / fn to_string(&self) -> String {
LL | | "A.to_string()".to_string()
LL | | }
| |_____^
|
= note: `-D clippy::inherent-to-string` implied by `-D warnings`
= help: implement trait 'Display' for type 'A' instead
error: type 'C' implements inherent method 'to_string() -> String' which shadows the implementation of 'Display'
--> $DIR/inherent_to_string.rs:42:5
|
LL | / fn to_string(&self) -> String {
LL | | "C.to_string()".to_string()
LL | | }
| |_____^
|
= note: #[deny(clippy::inherent_to_string_shadow_display)] on by default
= help: remove the inherent method from type 'C'
error: aborting due to 2 previous errors