rust/tests/ui/to_string_trait_impl.stderr

17 lines
494 B
Plaintext

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