fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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