]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs
Rollup merge of #75485 - RalfJung:pin, r=nagisa
[rust.git] / src / test / ui / const-generics / params-in-ct-in-ty-param-lazy-norm.rs
1 // revisions: full min
2
3 #![cfg_attr(full, feature(const_generics))]
4 #![cfg_attr(full, allow(incomplete_features))]
5 #![cfg_attr(min, feature(min_const_generics))]
6
7 struct Foo<T, U = [u8; std::mem::size_of::<T>()]>(T, U);
8 //[full]~^ ERROR constant values inside of type parameter defaults
9 //[min]~^^ ERROR generic parameters must not be used inside of non trivial
10
11 // FIXME(const_generics:defaults): We still don't know how to we deal with type defaults.
12 struct Bar<T = [u8; N], const N: usize>(T);
13 //~^ ERROR constant values inside of type parameter defaults
14 //~| ERROR type parameters with a default
15
16 fn main() {}