rust/src/test/ui/const-generics/issues/issue-61336.min.stderr

16 lines
487 B
Plaintext
Raw Normal View History

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