]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/defaults-suitability.stderr
Rollup merge of #76468 - SNCPlay42:lifetime-names, r=Mark-Simulacrum
[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:5
3    |
4 LL |     type Ty: Clone = NotClone;
5    |     ^^^^^^^^^-----^^^^^^^^^^^^
6    |     |        |
7    |     |        required by this bound in `Tr::Ty`
8    |     the trait `Clone` is not implemented for `NotClone`
9
10 error[E0277]: the trait bound `NotClone: Clone` is not satisfied
11   --> $DIR/defaults-suitability.rs:22:5
12    |
13 LL |     Self::Ty: Clone,
14    |               ----- required by this bound in `Tr2::Ty`
15 LL | {
16 LL |     type Ty = NotClone;
17    |     ^^^^^--^^^^^^^^^^^^
18    |     |    |
19    |     |    required by a bound in this
20    |     the trait `Clone` is not implemented for `NotClone`
21
22 error[E0277]: the trait bound `T: Clone` is not satisfied
23   --> $DIR/defaults-suitability.rs:28:5
24    |
25 LL |     type Bar: Clone = Vec<T>;
26    |     ^^^^^^^^^^-----^^^^^^^^^^
27    |     |         |
28    |     |         required by this bound in `Foo::Bar`
29    |     the trait `Clone` is not implemented for `T`
30    |
31    = note: required because of the requirements on the impl of `Clone` for `Vec<T>`
32 help: consider restricting type parameter `T`
33    |
34 LL | trait Foo<T: Clone> {
35    |            ^^^^^^^
36
37 error[E0277]: the trait bound `(): Foo<Self>` is not satisfied
38   --> $DIR/defaults-suitability.rs:34:5
39    |
40 LL |     type Assoc: Foo<Self> = ();
41    |     ^^^^^^^^^^^^---------^^^^^^
42    |     |           |
43    |     |           required by this bound in `Bar::Assoc`
44    |     the trait `Foo<Self>` is not implemented for `()`
45
46 error[E0277]: the trait bound `NotClone: IsU8<NotClone>` is not satisfied
47   --> $DIR/defaults-suitability.rs:56:5
48    |
49 LL |     Self::Assoc: IsU8<Self::Assoc>,
50    |                  ----------------- required by this bound in `D::Assoc`
51 ...
52 LL |     type Assoc = NotClone;
53    |     ^^^^^-----^^^^^^^^^^^^
54    |     |    |
55    |     |    required by a bound in this
56    |     the trait `IsU8<NotClone>` is not implemented for `NotClone`
57
58 error[E0277]: the trait bound `<Self as Foo2<T>>::Baz: Clone` is not satisfied
59   --> $DIR/defaults-suitability.rs:65:5
60    |
61 LL |     type Bar: Clone = Vec<Self::Baz>;
62    |     ^^^^^^^^^^-----^^^^^^^^^^^^^^^^^^
63    |     |         |
64    |     |         required by this bound in `Foo2::Bar`
65    |     the trait `Clone` is not implemented for `<Self as Foo2<T>>::Baz`
66    |
67    = note: required because of the requirements on the impl of `Clone` for `Vec<<Self as Foo2<T>>::Baz>`
68 help: consider further restricting the associated type
69    |
70 LL | trait Foo2<T> where <Self as Foo2<T>>::Baz: Clone {
71    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
72
73 error[E0277]: the trait bound `<Self as Foo25<T>>::Baz: Clone` is not satisfied
74   --> $DIR/defaults-suitability.rs:74:5
75    |
76 LL |     type Bar: Clone = Vec<Self::Baz>;
77    |     ^^^^^^^^^^-----^^^^^^^^^^^^^^^^^^
78    |     |         |
79    |     |         required by this bound in `Foo25::Bar`
80    |     the trait `Clone` is not implemented for `<Self as Foo25<T>>::Baz`
81    |
82    = note: required because of the requirements on the impl of `Clone` for `Vec<<Self as Foo25<T>>::Baz>`
83 help: consider further restricting the associated type
84    |
85 LL | trait Foo25<T: Clone> where <Self as Foo25<T>>::Baz: Clone {
86    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
87
88 error[E0277]: the trait bound `T: Clone` is not satisfied
89   --> $DIR/defaults-suitability.rs:87:5
90    |
91 LL |     Self::Baz: Clone,
92    |                ----- required by this bound in `Foo3::Baz`
93 ...
94 LL |     type Baz = T;
95    |     ^^^^^---^^^^^
96    |     |    |
97    |     |    required by a bound in this
98    |     the trait `Clone` is not implemented for `T`
99    |
100 help: consider further restricting type parameter `T`
101    |
102 LL |     Self::Baz: Clone, T: Clone
103    |                     ^^^^^^^^^^
104
105 error: aborting due to 8 previous errors
106
107 For more information about this error, try `rustc --explain E0277`.