2020-09-02 02:40:56 -05:00
|
|
|
error[E0277]: the trait bound `T: Copy` is not satisfied
|
2022-04-11 11:38:48 -05:00
|
|
|
--> $DIR/issue-61336-2.rs:6:6
|
2019-06-13 11:19:50 -05:00
|
|
|
|
|
2020-03-14 09:30:35 -05:00
|
|
|
LL | [x; { N }]
|
2022-04-11 11:38:48 -05:00
|
|
|
| ^ the trait `Copy` is not implemented for `T`
|
2020-03-14 09:30:35 -05:00
|
|
|
|
|
2022-04-28 04:40:42 -05:00
|
|
|
= note: the `Copy` trait is required because this value will be copied for each element of the array
|
2020-03-13 21:28:14 -05:00
|
|
|
help: consider restricting type parameter `T`
|
|
|
|
|
|
2021-03-30 04:56:39 -05:00
|
|
|
LL | fn g<T: std::marker::Copy, const N: usize>(x: T) -> [T; N] {
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++++++++++++++
|
2019-06-13 11:19:50 -05:00
|
|
|
|
2020-08-06 15:57:09 -05:00
|
|
|
error: aborting due to previous error
|
2019-06-13 11:19:50 -05:00
|
|
|
|
2020-03-14 09:30:35 -05:00
|
|
|
For more information about this error, try `rustc --explain E0277`.
|