]> git.lizzy.rs Git - rust.git/blob - tests/ui/to_string_in_display.stderr
Auto merge of #8374 - Alexendoo:bless-revisions, r=camsteffen
[rust.git] / tests / ui / to_string_in_display.stderr
1 error: using `to_string` in `fmt::Display` implementation might lead to infinite recursion
2   --> $DIR/to_string_in_display.rs:25:25
3    |
4 LL |         write!(f, "{}", self.to_string())
5    |                         ^^^^^^^^^^^^^^^^
6    |
7    = note: `-D clippy::to-string-in-display` implied by `-D warnings`
8
9 error: unnecessary use of `to_string`
10   --> $DIR/to_string_in_display.rs:55:50
11    |
12 LL |             Self::E(string) => write!(f, "E {}", string.to_string()),
13    |                                                  ^^^^^^^^^^^^^^^^^^
14    |
15    = note: `-D clippy::unnecessary-to-owned` implied by `-D warnings`
16    = note: this error originates in the macro `$crate::format_args` (in Nightly builds, run with -Z macro-backtrace for more info)
17
18 error: aborting due to 2 previous errors
19