]> git.lizzy.rs Git - rust.git/blob - tests/ui/recursive_format_impl.stderr
Auto merge of #8596 - Jaic1:unnecessary_cast, r=flip1995
[rust.git] / tests / ui / recursive_format_impl.stderr
1 error: using `self.to_string` in `fmt::Display` implementation will cause infinite recursion
2   --> $DIR/recursive_format_impl.rs:29:25
3    |
4 LL |         write!(f, "{}", self.to_string())
5    |                         ^^^^^^^^^^^^^^^^
6    |
7    = note: `-D clippy::recursive-format-impl` implied by `-D warnings`
8
9 error: unnecessary use of `to_string`
10   --> $DIR/recursive_format_impl.rs:61: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: using `self` as `Display` in `impl Display` will cause infinite recursion
19   --> $DIR/recursive_format_impl.rs:73:9
20    |
21 LL |         write!(f, "{}", self)
22    |         ^^^^^^^^^^^^^^^^^^^^^
23    |
24    = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info)
25
26 error: using `self` as `Display` in `impl Display` will cause infinite recursion
27   --> $DIR/recursive_format_impl.rs:82:9
28    |
29 LL |         write!(f, "{}", &self)
30    |         ^^^^^^^^^^^^^^^^^^^^^^
31    |
32    = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info)
33
34 error: using `self` as `Debug` in `impl Debug` will cause infinite recursion
35   --> $DIR/recursive_format_impl.rs:88:9
36    |
37 LL |         write!(f, "{:?}", &self)
38    |         ^^^^^^^^^^^^^^^^^^^^^^^^
39    |
40    = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info)
41
42 error: using `self` as `Display` in `impl Display` will cause infinite recursion
43   --> $DIR/recursive_format_impl.rs:97:9
44    |
45 LL |         write!(f, "{}", &&&self)
46    |         ^^^^^^^^^^^^^^^^^^^^^^^^
47    |
48    = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info)
49
50 error: using `self` as `Display` in `impl Display` will cause infinite recursion
51   --> $DIR/recursive_format_impl.rs:171:9
52    |
53 LL |         write!(f, "{}", &*self)
54    |         ^^^^^^^^^^^^^^^^^^^^^^^
55    |
56    = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info)
57
58 error: using `self` as `Debug` in `impl Debug` will cause infinite recursion
59   --> $DIR/recursive_format_impl.rs:177:9
60    |
61 LL |         write!(f, "{:?}", &*self)
62    |         ^^^^^^^^^^^^^^^^^^^^^^^^^
63    |
64    = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info)
65
66 error: using `self` as `Display` in `impl Display` will cause infinite recursion
67   --> $DIR/recursive_format_impl.rs:193:9
68    |
69 LL |         write!(f, "{}", *self)
70    |         ^^^^^^^^^^^^^^^^^^^^^^
71    |
72    = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info)
73
74 error: using `self` as `Display` in `impl Display` will cause infinite recursion
75   --> $DIR/recursive_format_impl.rs:209:9
76    |
77 LL |         write!(f, "{}", **&&*self)
78    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
79    |
80    = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info)
81
82 error: using `self` as `Display` in `impl Display` will cause infinite recursion
83   --> $DIR/recursive_format_impl.rs:225:9
84    |
85 LL |         write!(f, "{}", &&**&&*self)
86    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
87    |
88    = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info)
89
90 error: aborting due to 11 previous errors
91