]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/issue-74824.stderr
Rollup merge of #93613 - crlf0710:rename_to_async_iter, r=yaahc
[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: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:7: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:7:26
15    |
16 LL |     type Copy<T>: Copy = Box<T>;
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 note: required by a bound in `UnsafeCopy::Copy`
21   --> $DIR/issue-74824.rs:7:19
22    |
23 LL |     type Copy<T>: Copy = Box<T>;
24    |                   ^^^^ required by this bound in `UnsafeCopy::Copy`
25 help: consider restricting type parameter `T`
26    |
27 LL |     type Copy<T: std::clone::Clone>: Copy = Box<T>;
28    |                +++++++++++++++++++
29
30 error[E0282]: type annotations needed
31   --> $DIR/issue-74824.rs:19:16
32    |
33 LL |     let copy = <()>::copy(&b);
34    |                ^^^^^^^^^^ cannot infer type for type parameter `T` declared on the associated function `copy`
35
36 error: aborting due to 3 previous errors
37
38 Some errors have detailed explanations: E0277, E0282.
39 For more information about an error, try `rustc --explain E0277`.