2020-03-14 09:30:35 -05:00
|
|
|
error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied
|
2020-08-06 15:57:09 -05:00
|
|
|
--> $DIR/issue-61336-2.rs:10:5
|
2019-06-13 11:19:50 -05:00
|
|
|
|
|
2020-03-14 09:30:35 -05:00
|
|
|
LL | [x; { N }]
|
|
|
|
| ^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T`
|
|
|
|
|
|
|
|
|
= note: the `Copy` trait is required because the repeated element will be copied
|
2020-03-13 21:28:14 -05:00
|
|
|
help: consider restricting type parameter `T`
|
|
|
|
|
|
|
|
|
LL | fn g<T: std::marker::Copy, const N: usize>(x: T) -> [T; N] {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
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`.
|