summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/derive-macro-missing-bounds.stderr
blob: c3f305c1770acbc171468e381e972b0433cc3186 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
error[E0277]: `a::Inner<T>` doesn't implement `Debug`
  --> $DIR/derive-macro-missing-bounds.rs:12:21
   |
LL |     #[derive(Debug)]
   |              ----- in this derive macro expansion
LL |     struct Outer<T>(Inner<T>);
   |                     ^^^^^^^^ `a::Inner<T>` cannot be formatted using `{:?}`
   |
   = help: the trait `Debug` is not implemented for `a::Inner<T>`
   = note: add `#[derive(Debug)]` to `a::Inner<T>` or manually `impl Debug for a::Inner<T>`
   = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider annotating `a::Inner<T>` with `#[derive(Debug)]`
   |
LL +     #[derive(Debug)]
LL |     struct Inner<T>(T);
   |
help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement
   |
LL |     struct Outer<T>(Inner<T>) where a::Inner<T>: Debug;
   |                               ++++++++++++++++++++++++

error[E0277]: the trait bound `T: c::Trait` is not satisfied
  --> $DIR/derive-macro-missing-bounds.rs:41:21
   |
LL |     #[derive(Debug)]
   |              ----- in this derive macro expansion
LL |     struct Outer<T>(Inner<T>);
   |                     ^^^^^^^^ the trait `c::Trait` is not implemented for `T`
   |
note: required for `c::Inner<T>` to implement `Debug`
  --> $DIR/derive-macro-missing-bounds.rs:34:28
   |
LL |     impl<T: Debug + Trait> Debug for Inner<T> {
   |                     -----  ^^^^^     ^^^^^^^^
   |                     |
   |                     unsatisfied trait bound introduced here
   = note: 1 redundant requirement hidden
   = note: required for `&c::Inner<T>` to implement `Debug`
   = note: required for the cast from `&c::Inner<T>` to the object type `dyn Debug`
   = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider restricting type parameter `T`
   |
LL |     struct Outer<T: c::Trait>(Inner<T>);
   |                   ++++++++++

error[E0277]: the trait bound `T: d::Trait` is not satisfied
  --> $DIR/derive-macro-missing-bounds.rs:56:21
   |
LL |     #[derive(Debug)]
   |              ----- in this derive macro expansion
LL |     struct Outer<T>(Inner<T>);
   |                     ^^^^^^^^ the trait `d::Trait` is not implemented for `T`
   |
note: required for `d::Inner<T>` to implement `Debug`
  --> $DIR/derive-macro-missing-bounds.rs:49:13
   |
LL |     impl<T> Debug for Inner<T> where T: Debug, T: Trait {
   |             ^^^^^     ^^^^^^^^                    ----- unsatisfied trait bound introduced here
   = note: 1 redundant requirement hidden
   = note: required for `&d::Inner<T>` to implement `Debug`
   = note: required for the cast from `&d::Inner<T>` to the object type `dyn Debug`
   = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider restricting type parameter `T`
   |
LL |     struct Outer<T: d::Trait>(Inner<T>);
   |                   ++++++++++

error[E0277]: the trait bound `T: e::Trait` is not satisfied
  --> $DIR/derive-macro-missing-bounds.rs:71:21
   |
LL |     #[derive(Debug)]
   |              ----- in this derive macro expansion
LL |     struct Outer<T>(Inner<T>);
   |                     ^^^^^^^^ the trait `e::Trait` is not implemented for `T`
   |
note: required for `e::Inner<T>` to implement `Debug`
  --> $DIR/derive-macro-missing-bounds.rs:64:13
   |
LL |     impl<T> Debug for Inner<T> where T: Debug + Trait {
   |             ^^^^^     ^^^^^^^^                  ----- unsatisfied trait bound introduced here
   = note: 1 redundant requirement hidden
   = note: required for `&e::Inner<T>` to implement `Debug`
   = note: required for the cast from `&e::Inner<T>` to the object type `dyn Debug`
   = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider restricting type parameter `T`
   |
LL |     struct Outer<T: e::Trait>(Inner<T>);
   |                   ++++++++++

error[E0277]: the trait bound `T: f::Trait` is not satisfied
  --> $DIR/derive-macro-missing-bounds.rs:86:21
   |
LL |     #[derive(Debug)]
   |              ----- in this derive macro expansion
LL |     struct Outer<T>(Inner<T>);
   |                     ^^^^^^^^ the trait `f::Trait` is not implemented for `T`
   |
note: required for `f::Inner<T>` to implement `Debug`
  --> $DIR/derive-macro-missing-bounds.rs:79:20
   |
LL |     impl<T: Debug> Debug for Inner<T> where T: Trait {
   |                    ^^^^^     ^^^^^^^^          ----- unsatisfied trait bound introduced here
   = note: 1 redundant requirement hidden
   = note: required for `&f::Inner<T>` to implement `Debug`
   = note: required for the cast from `&f::Inner<T>` to the object type `dyn Debug`
   = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider restricting type parameter `T`
   |
LL |     struct Outer<T: f::Trait>(Inner<T>);
   |                   ++++++++++

error: aborting due to 5 previous errors

For more information about this error, try `rustc --explain E0277`.