]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/derive-macro-missing-bounds.stderr
Rollup merge of #105795 - nicholasbishop:bishop-stabilize-efiapi, r=joshtriplett
[rust.git] / tests / 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 annotating `a::Inner<T>` with `#[derive(Debug)]`
13    |
14 LL |     #[derive(Debug)]
15    |
16 help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement
17    |
18 LL |     struct Outer<T>(Inner<T>) where a::Inner<T>: Debug;
19    |                               ++++++++++++++++++++++++
20
21 error[E0277]: the trait bound `T: c::Trait` is not satisfied
22   --> $DIR/derive-macro-missing-bounds.rs:41:21
23    |
24 LL |     #[derive(Debug)]
25    |              ----- in this derive macro expansion
26 LL |     struct Outer<T>(Inner<T>);
27    |                     ^^^^^^^^ the trait `c::Trait` is not implemented for `T`
28    |
29 note: required for `c::Inner<T>` to implement `Debug`
30   --> $DIR/derive-macro-missing-bounds.rs:34:28
31    |
32 LL |     impl<T: Debug + Trait> Debug for Inner<T> {
33    |                     -----  ^^^^^     ^^^^^^^^
34    |                     |
35    |                     unsatisfied trait bound introduced here
36    = note: 1 redundant requirement hidden
37    = note: required for `&c::Inner<T>` to implement `Debug`
38    = note: required for the cast from `&c::Inner<T>` to the object type `dyn Debug`
39    = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
40 help: consider restricting type parameter `T`
41    |
42 LL |     struct Outer<T: c::Trait>(Inner<T>);
43    |                   ++++++++++
44
45 error[E0277]: the trait bound `T: d::Trait` is not satisfied
46   --> $DIR/derive-macro-missing-bounds.rs:56:21
47    |
48 LL |     #[derive(Debug)]
49    |              ----- in this derive macro expansion
50 LL |     struct Outer<T>(Inner<T>);
51    |                     ^^^^^^^^ the trait `d::Trait` is not implemented for `T`
52    |
53 note: required for `d::Inner<T>` to implement `Debug`
54   --> $DIR/derive-macro-missing-bounds.rs:49:13
55    |
56 LL |     impl<T> Debug for Inner<T> where T: Debug, T: Trait {
57    |             ^^^^^     ^^^^^^^^                    ----- unsatisfied trait bound introduced here
58    = note: 1 redundant requirement hidden
59    = note: required for `&d::Inner<T>` to implement `Debug`
60    = note: required for the cast from `&d::Inner<T>` to the object type `dyn Debug`
61    = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
62 help: consider restricting type parameter `T`
63    |
64 LL |     struct Outer<T: d::Trait>(Inner<T>);
65    |                   ++++++++++
66
67 error[E0277]: the trait bound `T: e::Trait` is not satisfied
68   --> $DIR/derive-macro-missing-bounds.rs:71:21
69    |
70 LL |     #[derive(Debug)]
71    |              ----- in this derive macro expansion
72 LL |     struct Outer<T>(Inner<T>);
73    |                     ^^^^^^^^ the trait `e::Trait` is not implemented for `T`
74    |
75 note: required for `e::Inner<T>` to implement `Debug`
76   --> $DIR/derive-macro-missing-bounds.rs:64:13
77    |
78 LL |     impl<T> Debug for Inner<T> where T: Debug + Trait {
79    |             ^^^^^     ^^^^^^^^                  ----- unsatisfied trait bound introduced here
80    = note: 1 redundant requirement hidden
81    = note: required for `&e::Inner<T>` to implement `Debug`
82    = note: required for the cast from `&e::Inner<T>` to the object type `dyn Debug`
83    = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
84 help: consider restricting type parameter `T`
85    |
86 LL |     struct Outer<T: e::Trait>(Inner<T>);
87    |                   ++++++++++
88
89 error[E0277]: the trait bound `T: f::Trait` is not satisfied
90   --> $DIR/derive-macro-missing-bounds.rs:86:21
91    |
92 LL |     #[derive(Debug)]
93    |              ----- in this derive macro expansion
94 LL |     struct Outer<T>(Inner<T>);
95    |                     ^^^^^^^^ the trait `f::Trait` is not implemented for `T`
96    |
97 note: required for `f::Inner<T>` to implement `Debug`
98   --> $DIR/derive-macro-missing-bounds.rs:79:20
99    |
100 LL |     impl<T: Debug> Debug for Inner<T> where T: Trait {
101    |                    ^^^^^     ^^^^^^^^          ----- unsatisfied trait bound introduced here
102    = note: 1 redundant requirement hidden
103    = note: required for `&f::Inner<T>` to implement `Debug`
104    = note: required for the cast from `&f::Inner<T>` to the object type `dyn Debug`
105    = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
106 help: consider restricting type parameter `T`
107    |
108 LL |     struct Outer<T: f::Trait>(Inner<T>);
109    |                   ++++++++++
110
111 error: aborting due to 5 previous errors
112
113 For more information about this error, try `rustc --explain E0277`.