]> git.lizzy.rs Git - rust.git/blob - tests/ui/generic-associated-types/issue-74824.stderr
Auto merge of #106851 - matthiaskrgr:rollup-d9dz3yp, r=matthiaskrgr
[rust.git] / tests / ui / generic-associated-types / issue-74824.stderr
1 error[E0277]: the trait bound `Box<T>: Copy` is not satisfied
2   --> $DIR/issue-74824.rs:6:26
3    |
4 LL |     type Copy<T>: Copy = Box<T>;
5    |                          ^^^^^^ the trait `Copy` is not implemented for `Box<T>`
6    |
7 note: required by a bound in `UnsafeCopy::Copy`
8   --> $DIR/issue-74824.rs:6:19
9    |
10 LL |     type Copy<T>: Copy = Box<T>;
11    |                   ^^^^ required by this bound in `UnsafeCopy::Copy`
12
13 error[E0277]: the trait bound `T: Clone` is not satisfied
14   --> $DIR/issue-74824.rs:6:26
15    |
16 LL |     type Copy<T>: Copy = Box<T>;
17    |                          ^^^^^^ the trait `Clone` is not implemented for `T`
18    |
19    = note: required for `Box<T>` to implement `Clone`
20    = note: required for `<Self as UnsafeCopy>::Copy<T>` to implement `Copy`
21 note: required by a bound in `UnsafeCopy::Copy`
22   --> $DIR/issue-74824.rs:6:19
23    |
24 LL |     type Copy<T>: Copy = Box<T>;
25    |                   ^^^^ required by this bound in `UnsafeCopy::Copy`
26 help: consider restricting type parameter `T`
27    |
28 LL |     type Copy<T: std::clone::Clone>: Copy = Box<T>;
29    |                +++++++++++++++++++
30
31 error: aborting due to 2 previous errors
32
33 For more information about this error, try `rustc --explain E0277`.