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