]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/defaults-suitability.stderr
Rollup merge of #105843 - compiler-errors:sugg-const, r=lcnr
[rust.git] / src / test / ui / associated-types / defaults-suitability.stderr
1 error[E0277]: the trait bound `NotClone: Clone` is not satisfied
2   --> $DIR/defaults-suitability.rs:13:22
3    |
4 LL |     type Ty: Clone = NotClone;
5    |                      ^^^^^^^^ the trait `Clone` is not implemented for `NotClone`
6    |
7 note: required by a bound in `Tr::Ty`
8   --> $DIR/defaults-suitability.rs:13:14
9    |
10 LL |     type Ty: Clone = NotClone;
11    |              ^^^^^ required by this bound in `Tr::Ty`
12 help: consider annotating `NotClone` with `#[derive(Clone)]`
13    |
14 LL | #[derive(Clone)]
15    |
16
17 error[E0277]: the trait bound `NotClone: Clone` is not satisfied
18   --> $DIR/defaults-suitability.rs:22:15
19    |
20 LL |     type Ty = NotClone;
21    |               ^^^^^^^^ the trait `Clone` is not implemented for `NotClone`
22    |
23 note: required by a bound in `Tr2::Ty`
24   --> $DIR/defaults-suitability.rs:20:15
25    |
26 LL |     Self::Ty: Clone,
27    |               ^^^^^ required by this bound in `Tr2::Ty`
28 LL | {
29 LL |     type Ty = NotClone;
30    |          -- required by a bound in this
31 help: consider annotating `NotClone` with `#[derive(Clone)]`
32    |
33 LL | #[derive(Clone)]
34    |
35
36 error[E0277]: the trait bound `T: Clone` is not satisfied
37   --> $DIR/defaults-suitability.rs:28:23
38    |
39 LL |     type Bar: Clone = Vec<T>;
40    |                       ^^^^^^ the trait `Clone` is not implemented for `T`
41    |
42    = note: required for `Vec<T>` to implement `Clone`
43 note: required by a bound in `Foo::Bar`
44   --> $DIR/defaults-suitability.rs:28:15
45    |
46 LL |     type Bar: Clone = Vec<T>;
47    |               ^^^^^ required by this bound in `Foo::Bar`
48 help: consider restricting type parameter `T`
49    |
50 LL | trait Foo<T: std::clone::Clone> {
51    |            +++++++++++++++++++
52
53 error[E0277]: the trait bound `(): Foo<Self>` is not satisfied
54   --> $DIR/defaults-suitability.rs:34:29
55    |
56 LL |     type Assoc: Foo<Self> = ();
57    |                             ^^ the trait `Foo<Self>` is not implemented for `()`
58    |
59 note: required by a bound in `Bar::Assoc`
60   --> $DIR/defaults-suitability.rs:34:17
61    |
62 LL |     type Assoc: Foo<Self> = ();
63    |                 ^^^^^^^^^ required by this bound in `Bar::Assoc`
64
65 error[E0277]: the trait bound `NotClone: IsU8<NotClone>` is not satisfied
66   --> $DIR/defaults-suitability.rs:56:18
67    |
68 LL |     type Assoc = NotClone;
69    |                  ^^^^^^^^ the trait `IsU8<NotClone>` is not implemented for `NotClone`
70    |
71 note: required by a bound in `D::Assoc`
72   --> $DIR/defaults-suitability.rs:53:18
73    |
74 LL |     Self::Assoc: IsU8<Self::Assoc>,
75    |                  ^^^^^^^^^^^^^^^^^ required by this bound in `D::Assoc`
76 ...
77 LL |     type Assoc = NotClone;
78    |          ----- required by a bound in this
79
80 error[E0277]: the trait bound `<Self as Foo2<T>>::Baz: Clone` is not satisfied
81   --> $DIR/defaults-suitability.rs:65:23
82    |
83 LL |     type Bar: Clone = Vec<Self::Baz>;
84    |                       ^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `<Self as Foo2<T>>::Baz`
85    |
86    = note: required for `Vec<<Self as Foo2<T>>::Baz>` to implement `Clone`
87 note: required by a bound in `Foo2::Bar`
88   --> $DIR/defaults-suitability.rs:65:15
89    |
90 LL |     type Bar: Clone = Vec<Self::Baz>;
91    |               ^^^^^ required by this bound in `Foo2::Bar`
92 help: consider further restricting the associated type
93    |
94 LL | trait Foo2<T> where <Self as Foo2<T>>::Baz: Clone {
95    |               +++++++++++++++++++++++++++++++++++
96
97 error[E0277]: the trait bound `<Self as Foo25<T>>::Baz: Clone` is not satisfied
98   --> $DIR/defaults-suitability.rs:74:23
99    |
100 LL |     type Bar: Clone = Vec<Self::Baz>;
101    |                       ^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `<Self as Foo25<T>>::Baz`
102    |
103    = note: required for `Vec<<Self as Foo25<T>>::Baz>` to implement `Clone`
104 note: required by a bound in `Foo25::Bar`
105   --> $DIR/defaults-suitability.rs:74:15
106    |
107 LL |     type Bar: Clone = Vec<Self::Baz>;
108    |               ^^^^^ required by this bound in `Foo25::Bar`
109 help: consider further restricting the associated type
110    |
111 LL | trait Foo25<T: Clone> where <Self as Foo25<T>>::Baz: Clone {
112    |                       ++++++++++++++++++++++++++++++++++++
113
114 error[E0277]: the trait bound `T: Clone` is not satisfied
115   --> $DIR/defaults-suitability.rs:87:16
116    |
117 LL |     type Baz = T;
118    |                ^ the trait `Clone` is not implemented for `T`
119    |
120 note: required by a bound in `Foo3::Baz`
121   --> $DIR/defaults-suitability.rs:84:16
122    |
123 LL |     Self::Baz: Clone,
124    |                ^^^^^ required by this bound in `Foo3::Baz`
125 ...
126 LL |     type Baz = T;
127    |          --- required by a bound in this
128 help: consider further restricting type parameter `T`
129    |
130 LL |     Self::Baz: Clone, T: std::clone::Clone
131    |                     ~~~~~~~~~~~~~~~~~~~~~~
132
133 error: aborting due to 8 previous errors
134
135 For more information about this error, try `rustc --explain E0277`.