fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
820 B23 linesraw
1warning: the feature `const_generics` is incomplete and may cause the compiler to crash
2  --> $DIR/issue-61336-2.rs:1:12
3   |
4LL | #![feature(const_generics)]
5   |            ^^^^^^^^^^^^^^
6   |
7   = note: `#[warn(incomplete_features)]` on by default
8
9error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied
10  --> $DIR/issue-61336-2.rs:9:5
11   |
12LL |     [x; { N }]
13   |     ^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T`
14   |
15   = note: the `Copy` trait is required because the repeated element will be copied
16help: consider restricting type parameter `T`
17   |
18LL | fn g<T: std::marker::Copy, const N: usize>(x: T) -> [T; N] {
19   |       ^^^^^^^^^^^^^^^^^^^
20
21error: aborting due to previous error; 1 warning emitted
22
23For more information about this error, try `rustc --explain E0277`.