rust-clippy/tests/ui/to_string_trait_impl.stderr
2024-01-26 19:28:54 -05:00

16 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