Files
rust/tests/ui/to_string_trait_impl.stderr
bjorn3 bc410fc9f5 Stop handling specialization in clippy's to_string_trait_impl lint
ToString can no longer be specialized, so no need to account for it in
to_string_trait_impl either.
2024-12-14 18:04:00 +00:00

17 lines
498 B
Plaintext

error: direct implementation of `ToString`
--> tests/ui/to_string_trait_impl.rs:11: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