]>
Commit | Line | Data |
---|---|---|
3dfed10e XL |
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 must not be used inside of non trivial constant values | |
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 | | ^ non-trivial anonymous constants must not depend on the parameter `T` | |
14 | | | |
1b1a35ee | 15 | = note: type parameters are currently not permitted in anonymous constants |
3dfed10e XL |
16 | |
17 | error: constant values inside of type parameter defaults must not depend on generic parameters | |
18 | --> $DIR/params-in-ct-in-ty-param-lazy-norm.rs:12:21 | |
19 | | | |
20 | LL | struct Bar<T = [u8; N], const N: usize>(T); | |
21 | | ^ the anonymous constant must not depend on the parameter `N` | |
22 | ||
23 | error: aborting due to 3 previous errors | |
24 |