]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/issue-74824.stderr
Rollup merge of #86764 - estebank:issue-86756, r=pnkfelix
[rust.git] / src / test / ui / generic-associated-types / issue-74824.stderr
1 error[E0277]: the trait bound `Box<T>: Copy` is not satisfied
2   --> $DIR/issue-74824.rs:7:5
3    |
4 LL |     type Copy<T>: Copy = Box<T>;
5    |     ^^^^^^^^^^^^^^----^^^^^^^^^^
6    |     |             |
7    |     |             required by this bound in `UnsafeCopy::Copy`
8    |     the trait `Copy` is not implemented for `Box<T>`
9
10 error[E0277]: the trait bound `T: Clone` is not satisfied
11   --> $DIR/issue-74824.rs:7:5
12    |
13 LL |     type Copy<T>: Copy = Box<T>;
14    |     ^^^^^^^^^^^^^^----^^^^^^^^^^
15    |     |             |
16    |     |             required by this bound in `UnsafeCopy::Copy`
17    |     the trait `Clone` is not implemented for `T`
18    |
19    = note: required because of the requirements on the impl of `Clone` for `Box<T>`
20 help: consider restricting type parameter `T`
21    |
22 LL |     type Copy<T: std::clone::Clone>: Copy = Box<T>;
23    |                ^^^^^^^^^^^^^^^^^^^
24
25 error: aborting due to 2 previous errors
26
27 For more information about this error, try `rustc --explain E0277`.