mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-24 03:53:20 +00:00
19 lines
787 B
Text
19 lines
787 B
Text
error: using `to_string` in `fmt::Display` implementation might lead to infinite recursion
|
|
--> $DIR/to_string_in_display.rs:25:25
|
|
|
|
|
LL | write!(f, "{}", self.to_string())
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: `-D clippy::to-string-in-display` implied by `-D warnings`
|
|
|
|
error: unnecessary use of `to_string`
|
|
--> $DIR/to_string_in_display.rs:55:50
|
|
|
|
|
LL | Self::E(string) => write!(f, "E {}", string.to_string()),
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: `-D clippy::unnecessary-to-owned` implied by `-D warnings`
|
|
= note: this error originates in the macro `$crate::format_args` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: aborting due to 2 previous errors
|
|
|