]> git.proxmox.com Git - rustc.git/blame - src/test/ui/const-generics/issues/issue-61336-2.full.stderr
New upstream version 1.53.0+dfsg1
[rustc.git] / src / test / ui / const-generics / issues / issue-61336-2.full.stderr
CommitLineData
f9f354fc 1warning: 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
4LL | #![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 10error[E0277]: the trait bound `T: Copy` is not satisfied
5869c6ff 11 --> $DIR/issue-61336-2.rs:9:5
dc9dc135 12 |
ba9703b0 13LL | [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
17help: consider restricting type parameter `T`
dc9dc135 18 |
cdc7bbd5
XL
19LL | fn g<T: std::marker::Copy, const N: usize>(x: T) -> [T; N] {
20 | ^^^^^^^^^^^^^^^^^^^
dc9dc135 21
ba9703b0 22error: aborting due to previous error; 1 warning emitted
dc9dc135 23
ba9703b0 24For more information about this error, try `rustc --explain E0277`.