2020-09-02 02:40:56 -05:00
|
|
|
error[E0277]: the trait bound `T: Copy` is not satisfied
|
2020-11-17 04:44:21 -06:00
|
|
|
--> $DIR/issue-61336.rs:9:5
|
2020-08-06 15:57:09 -05:00
|
|
|
|
|
|
|
|
LL | [x; N]
|
2020-09-02 02:40:56 -05:00
|
|
|
| ^^^^^^ the trait `Copy` is not implemented for `T`
|
2020-08-06 15:57:09 -05:00
|
|
|
|
|
|
|
|
= note: the `Copy` trait is required because the repeated element will be copied
|
|
|
|
help: consider restricting type parameter `T`
|
|
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
LL | fn g<T: Copy, const N: usize>(x: T) -> [T; N] {
|
|
|
|
| ^^^^^^
|
2020-08-06 15:57:09 -05:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|