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