rust/tests/ui/inherent_to_string.stderr

28 lines
923 B
Plaintext
Raw Normal View History

2019-07-15 11:43:47 -05:00
error: implementation of inherent method `to_string(&self) -> String` for type `A`
--> tests/ui/inherent_to_string.rs:22:5
|
LL | / fn to_string(&self) -> String {
LL | |
LL | | "A.to_string()".to_string()
LL | | }
| |_____^
|
2019-07-15 11:43:47 -05:00
= help: implement trait `Display` for type `A` instead
2022-09-22 11:04:22 -05:00
= note: `-D clippy::inherent-to-string` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::inherent_to_string)]`
2019-07-15 11:43:47 -05:00
error: type `C` implements inherent method `to_string(&self) -> String` which shadows the implementation of `Display`
--> tests/ui/inherent_to_string.rs:47:5
|
LL | / fn to_string(&self) -> String {
LL | |
LL | | "C.to_string()".to_string()
LL | | }
| |_____^
|
2022-09-22 11:04:22 -05:00
= help: remove the inherent method from type `C`
= note: `#[deny(clippy::inherent_to_string_shadow_display)]` on by default
2019-07-15 11:43:47 -05:00
error: aborting due to 2 previous errors