]> git.proxmox.com Git - rustc.git/blame - src/test/ui/const-generics/issues/issue-61336-2.stderr
New upstream version 1.62.1+dfsg1
[rustc.git] / src / test / ui / const-generics / issues / issue-61336-2.stderr
CommitLineData
1b1a35ee 1error[E0277]: the trait bound `T: Copy` is not satisfied
04454e1e 2 --> $DIR/issue-61336-2.rs:6:6
dc9dc135 3 |
ba9703b0 4LL | [x; { N }]
04454e1e 5 | ^ the trait `Copy` is not implemented for `T`
ba9703b0 6 |
04454e1e 7 = note: the `Copy` trait is required because this value will be copied for each element of the array
ba9703b0 8help: consider restricting type parameter `T`
dc9dc135 9 |
cdc7bbd5 10LL | fn g<T: std::marker::Copy, const N: usize>(x: T) -> [T; N] {
94222f64 11 | +++++++++++++++++++
dc9dc135 12
3dfed10e 13error: aborting due to previous error
dc9dc135 14
ba9703b0 15For more information about this error, try `rustc --explain E0277`.