]> git.proxmox.com Git - rustc.git/blob - src/test/ui/suggestions/derive-macro-missing-bounds.stderr
New upstream version 1.62.1+dfsg1
[rustc.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 annotating `a::Inner<T>` with `#[derive(Debug)]`
13 |
14 LL | #[derive(Debug)]
15 |
16 help: consider introducing a `where` bound, 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 because of the requirements on the impl of `Debug` for `c::Inner<T>`
30 --> $DIR/derive-macro-missing-bounds.rs:34:28
31 |
32 LL | impl<T: Debug + Trait> Debug for Inner<T> {
33 | ^^^^^ ^^^^^^^^
34 = note: 1 redundant requirement hidden
35 = note: required because of the requirements on the impl of `Debug` for `&c::Inner<T>`
36 = note: required for the cast to the object type `dyn Debug`
37 = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
38 help: consider restricting type parameter `T`
39 |
40 LL | struct Outer<T: c::Trait>(Inner<T>);
41 | ++++++++++
42
43 error[E0277]: the trait bound `T: d::Trait` is not satisfied
44 --> $DIR/derive-macro-missing-bounds.rs:56:21
45 |
46 LL | #[derive(Debug)]
47 | ----- in this derive macro expansion
48 LL | struct Outer<T>(Inner<T>);
49 | ^^^^^^^^ the trait `d::Trait` is not implemented for `T`
50 |
51 note: required because of the requirements on the impl of `Debug` for `d::Inner<T>`
52 --> $DIR/derive-macro-missing-bounds.rs:49:13
53 |
54 LL | impl<T> Debug for Inner<T> where T: Debug, T: Trait {
55 | ^^^^^ ^^^^^^^^
56 = note: 1 redundant requirement hidden
57 = note: required because of the requirements on the impl of `Debug` for `&d::Inner<T>`
58 = note: required for the cast to the object type `dyn Debug`
59 = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
60 help: consider restricting type parameter `T`
61 |
62 LL | struct Outer<T: d::Trait>(Inner<T>);
63 | ++++++++++
64
65 error[E0277]: the trait bound `T: e::Trait` is not satisfied
66 --> $DIR/derive-macro-missing-bounds.rs:71:21
67 |
68 LL | #[derive(Debug)]
69 | ----- in this derive macro expansion
70 LL | struct Outer<T>(Inner<T>);
71 | ^^^^^^^^ the trait `e::Trait` is not implemented for `T`
72 |
73 note: required because of the requirements on the impl of `Debug` for `e::Inner<T>`
74 --> $DIR/derive-macro-missing-bounds.rs:64:13
75 |
76 LL | impl<T> Debug for Inner<T> where T: Debug + Trait {
77 | ^^^^^ ^^^^^^^^
78 = note: 1 redundant requirement hidden
79 = note: required because of the requirements on the impl of `Debug` for `&e::Inner<T>`
80 = note: required for the cast to the object type `dyn Debug`
81 = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
82 help: consider restricting type parameter `T`
83 |
84 LL | struct Outer<T: e::Trait>(Inner<T>);
85 | ++++++++++
86
87 error[E0277]: the trait bound `T: f::Trait` is not satisfied
88 --> $DIR/derive-macro-missing-bounds.rs:86:21
89 |
90 LL | #[derive(Debug)]
91 | ----- in this derive macro expansion
92 LL | struct Outer<T>(Inner<T>);
93 | ^^^^^^^^ the trait `f::Trait` is not implemented for `T`
94 |
95 note: required because of the requirements on the impl of `Debug` for `f::Inner<T>`
96 --> $DIR/derive-macro-missing-bounds.rs:79:20
97 |
98 LL | impl<T: Debug> Debug for Inner<T> where T: Trait {
99 | ^^^^^ ^^^^^^^^
100 = note: 1 redundant requirement hidden
101 = note: required because of the requirements on the impl of `Debug` for `&f::Inner<T>`
102 = note: required for the cast to the object type `dyn Debug`
103 = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
104 help: consider restricting type parameter `T`
105 |
106 LL | struct Outer<T: f::Trait>(Inner<T>);
107 | ++++++++++
108
109 error: aborting due to 5 previous errors
110
111 For more information about this error, try `rustc --explain E0277`.