diff options
Diffstat (limited to 'tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs')
-rw-r--r-- | tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs b/tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs new file mode 100644 index 000000000..b24a7afab --- /dev/null +++ b/tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs @@ -0,0 +1,12 @@ +// revisions: full min +#![cfg_attr(full, feature(generic_const_exprs))] +#![cfg_attr(full, allow(incomplete_features))] + +struct Foo<T, U = [u8; std::mem::size_of::<T>()]>(T, U); +//[min]~^ ERROR generic parameters may not be used in const operations + +struct Bar<T = [u8; N], const N: usize>(T); +//~^ ERROR generic parameters with a default cannot use forward declared identifiers +//~| ERROR generic parameters with a default + +fn main() {} |