mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 15:11:30 +00:00
17 lines
494 B
Text
17 lines
494 B
Text
|
error: direct implementation of `ToString`
|
||
|
--> $DIR/to_string_trait_impl.rs:10:1
|
||
|
|
|
||
|
LL | / impl ToString for Point {
|
||
|
LL | | fn to_string(&self) -> String {
|
||
|
LL | | format!("({}, {})", self.x, self.y)
|
||
|
LL | | }
|
||
|
LL | | }
|
||
|
| |_^
|
||
|
|
|
||
|
= help: prefer implementing `Display` instead
|
||
|
= note: `-D clippy::to-string-trait-impl` implied by `-D warnings`
|
||
|
= help: to override `-D warnings` add `#[allow(clippy::to_string_trait_impl)]`
|
||
|
|
||
|
error: aborting due to 1 previous error
|
||
|
|