]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/derive-macro-missing-bounds.stderr
Rollup merge of #92612 - atopia:update-lib-l4re, r=dtolnay
[rust.git] / src / test / ui / suggestions / derive-macro-missing-bounds.stderr
1 error[E0277]: `a::Inner<T>` doesn't implement `Debug`
2   --> $DIR/derive-macro-missing-bounds.rs:12:21
3    |
4 LL |     #[derive(Debug)]
5    |              ----- in this derive macro expansion
6 LL |     struct Outer<T>(Inner<T>);
7    |                     ^^^^^^^^ `a::Inner<T>` cannot be formatted using `{:?}`
8    |
9    = help: the trait `Debug` is not implemented for `a::Inner<T>`
10    = note: add `#[derive(Debug)]` to `a::Inner<T>` or manually `impl Debug for a::Inner<T>`
11    = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
12 help: consider introducing a `where` bound, but there might be an alternative better way to express this requirement
13    |
14 LL |     struct Outer<T>(Inner<T>) where a::Inner<T>: Debug;
15    |                               ++++++++++++++++++++++++
16
17 error[E0277]: the trait bound `T: c::Trait` is not satisfied
18   --> $DIR/derive-macro-missing-bounds.rs:41:21
19    |
20 LL |     #[derive(Debug)]
21    |              ----- in this derive macro expansion
22 LL |     struct Outer<T>(Inner<T>);
23    |                     ^^^^^^^^ the trait `c::Trait` is not implemented for `T`
24    |
25 note: required because of the requirements on the impl of `Debug` for `c::Inner<T>`
26   --> $DIR/derive-macro-missing-bounds.rs:34:28
27    |
28 LL |     impl<T: Debug + Trait> Debug for Inner<T> {
29    |                            ^^^^^     ^^^^^^^^
30    = note: 1 redundant requirement hidden
31    = note: required because of the requirements on the impl of `Debug` for `&c::Inner<T>`
32    = note: required for the cast to the object type `dyn Debug`
33    = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
34 help: consider restricting type parameter `T`
35    |
36 LL |     struct Outer<T: c::Trait>(Inner<T>);
37    |                   ++++++++++
38
39 error[E0277]: the trait bound `T: d::Trait` is not satisfied
40   --> $DIR/derive-macro-missing-bounds.rs:56:21
41    |
42 LL |     #[derive(Debug)]
43    |              ----- in this derive macro expansion
44 LL |     struct Outer<T>(Inner<T>);
45    |                     ^^^^^^^^ the trait `d::Trait` is not implemented for `T`
46    |
47 note: required because of the requirements on the impl of `Debug` for `d::Inner<T>`
48   --> $DIR/derive-macro-missing-bounds.rs:49:13
49    |
50 LL |     impl<T> Debug for Inner<T> where T: Debug, T: Trait {
51    |             ^^^^^     ^^^^^^^^
52    = note: 1 redundant requirement hidden
53    = note: required because of the requirements on the impl of `Debug` for `&d::Inner<T>`
54    = note: required for the cast to the object type `dyn Debug`
55    = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
56 help: consider restricting type parameter `T`
57    |
58 LL |     struct Outer<T: d::Trait>(Inner<T>);
59    |                   ++++++++++
60
61 error[E0277]: the trait bound `T: e::Trait` is not satisfied
62   --> $DIR/derive-macro-missing-bounds.rs:71:21
63    |
64 LL |     #[derive(Debug)]
65    |              ----- in this derive macro expansion
66 LL |     struct Outer<T>(Inner<T>);
67    |                     ^^^^^^^^ the trait `e::Trait` is not implemented for `T`
68    |
69 note: required because of the requirements on the impl of `Debug` for `e::Inner<T>`
70   --> $DIR/derive-macro-missing-bounds.rs:64:13
71    |
72 LL |     impl<T> Debug for Inner<T> where T: Debug + Trait {
73    |             ^^^^^     ^^^^^^^^
74    = note: 1 redundant requirement hidden
75    = note: required because of the requirements on the impl of `Debug` for `&e::Inner<T>`
76    = note: required for the cast to the object type `dyn Debug`
77    = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
78 help: consider restricting type parameter `T`
79    |
80 LL |     struct Outer<T: e::Trait>(Inner<T>);
81    |                   ++++++++++
82
83 error[E0277]: the trait bound `T: f::Trait` is not satisfied
84   --> $DIR/derive-macro-missing-bounds.rs:86:21
85    |
86 LL |     #[derive(Debug)]
87    |              ----- in this derive macro expansion
88 LL |     struct Outer<T>(Inner<T>);
89    |                     ^^^^^^^^ the trait `f::Trait` is not implemented for `T`
90    |
91 note: required because of the requirements on the impl of `Debug` for `f::Inner<T>`
92   --> $DIR/derive-macro-missing-bounds.rs:79:20
93    |
94 LL |     impl<T: Debug> Debug for Inner<T> where T: Trait {
95    |                    ^^^^^     ^^^^^^^^
96    = note: 1 redundant requirement hidden
97    = note: required because of the requirements on the impl of `Debug` for `&f::Inner<T>`
98    = note: required for the cast to the object type `dyn Debug`
99    = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
100 help: consider restricting type parameter `T`
101    |
102 LL |     struct Outer<T: f::Trait>(Inner<T>);
103    |                   ++++++++++
104
105 error: aborting due to 5 previous errors
106
107 For more information about this error, try `rustc --explain E0277`.