]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.min.stderr
Auto merge of #106825 - weihanglo:update-cargo, r=weihanglo
[rust.git] / tests / ui / const-generics / params-in-ct-in-ty-param-lazy-norm.min.stderr
1 error: generic parameters with a default must be trailing
2   --> $DIR/params-in-ct-in-ty-param-lazy-norm.rs:8:12
3    |
4 LL | struct Bar<T = [u8; N], const N: usize>(T);
5    |            ^
6
7 error: generic parameters may not be used in const operations
8   --> $DIR/params-in-ct-in-ty-param-lazy-norm.rs:5:44
9    |
10 LL | struct Foo<T, U = [u8; std::mem::size_of::<T>()]>(T, U);
11    |                                            ^ cannot perform const operation using `T`
12    |
13    = note: type parameters may not be used in const expressions
14    = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
15
16 error[E0128]: generic parameters with a default cannot use forward declared identifiers
17   --> $DIR/params-in-ct-in-ty-param-lazy-norm.rs:8:21
18    |
19 LL | struct Bar<T = [u8; N], const N: usize>(T);
20    |                     ^ defaulted generic parameters cannot be forward declared
21
22 error: aborting due to 3 previous errors
23
24 For more information about this error, try `rustc --explain E0128`.