]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/issues/issue-61336-2.full.stderr
Merge branch 'master' into feature/incorporate-tracing
[rust.git] / src / test / ui / const-generics / issues / issue-61336-2.full.stderr
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: std::marker::Copy` is not satisfied
11   --> $DIR/issue-61336-2.rs:10:5
12    |
13 LL |     [x; { N }]
14    |     ^^^^^^^^^^ the trait `std::marker::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`.