mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-13 00:56:14 +00:00
29 lines
801 B
Plaintext
29 lines
801 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: direct implementation of `ToString`
|
|
--> tests/ui/to_string_trait_impl.rs:56:5
|
|
|
|
|
LL | / impl ToString for S<i32> {
|
|
LL | | fn to_string(&self) -> String {
|
|
LL | | todo!()
|
|
LL | | }
|
|
LL | | }
|
|
| |_____^
|
|
|
|
|
= help: prefer implementing `Display` instead
|
|
|
|
error: aborting due to 2 previous errors
|
|
|