mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-13 00:56:14 +00:00
28 lines
915 B
Plaintext
28 lines
915 B
Plaintext
error: implementation of inherent method `to_string(&self) -> String` for type `A`
|
|
--> $DIR/inherent_to_string.rs:22:5
|
|
|
|
|
LL | / fn to_string(&self) -> String {
|
|
LL | |
|
|
LL | | "A.to_string()".to_string()
|
|
LL | | }
|
|
| |_____^
|
|
|
|
|
= help: implement trait `Display` for type `A` instead
|
|
= note: `-D clippy::inherent-to-string` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::inherent_to_string)]`
|
|
|
|
error: type `C` implements inherent method `to_string(&self) -> String` which shadows the implementation of `Display`
|
|
--> $DIR/inherent_to_string.rs:47:5
|
|
|
|
|
LL | / fn to_string(&self) -> String {
|
|
LL | |
|
|
LL | | "C.to_string()".to_string()
|
|
LL | | }
|
|
| |_____^
|
|
|
|
|
= help: remove the inherent method from type `C`
|
|
= note: `#[deny(clippy::inherent_to_string_shadow_display)]` on by default
|
|
|
|
error: aborting due to 2 previous errors
|
|
|