]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.min.stderr
Auto merge of #79377 - jonas-schievink:rollup-ye81i66, r=jonas-schievink
[rust.git] / src / test / ui / const-generics / params-in-ct-in-ty-param-lazy-norm.min.stderr
1 error: type parameters with a default must be trailing
2   --> $DIR/params-in-ct-in-ty-param-lazy-norm.rs:12:12
3    |
4 LL | struct Bar<T = [u8; N], const N: usize>(T);
5    |            ^
6    |
7    = note: using type defaults and const parameters in the same parameter list is currently not permitted
8
9 error: generic parameters may not be used in const operations
10   --> $DIR/params-in-ct-in-ty-param-lazy-norm.rs:7:44
11    |
12 LL | struct Foo<T, U = [u8; std::mem::size_of::<T>()]>(T, U);
13    |                                            ^ cannot perform const operation using `T`
14    |
15    = note: type parameters may not be used in const expressions
16    = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions
17
18 error: constant values inside of type parameter defaults must not depend on generic parameters
19   --> $DIR/params-in-ct-in-ty-param-lazy-norm.rs:12:21
20    |
21 LL | struct Bar<T = [u8; N], const N: usize>(T);
22    |                     ^ the anonymous constant must not depend on the parameter `N`
23
24 error: aborting due to 3 previous errors
25