2
0
Fork 0
mirror of https://github.com/rust-lang/rust-clippy synced 2024-12-25 12:33:30 +00:00
rust-clippy/tests/ui/inherent_to_string.stderr

29 lines
934 B
Text
Raw Normal View History

2019-07-15 16:43:47 +00:00
error: implementation of inherent method `to_string(&self) -> String` for type `A`
--> $DIR/inherent_to_string.rs:20:5
|
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 16:43:47 +00:00
= help: implement trait `Display` for type `A` instead
2019-07-15 16:43:47 +00:00
error: type `C` implements inherent method `to_string(&self) -> String` which shadows the implementation of `Display`
--> $DIR/inherent_to_string.rs:44:5
|
LL | / fn to_string(&self) -> String {
LL | | "C.to_string()".to_string()
LL | | }
| |_____^
|
2020-01-31 19:21:10 +00:00
note: the lint level is defined here
2019-07-15 16:43:47 +00:00
--> $DIR/inherent_to_string.rs:2:9
|
LL | #![deny(clippy::inherent_to_string_shadow_display)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: remove the inherent method from type `C`
2019-07-15 16:43:47 +00:00
error: aborting due to 2 previous errors