]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/generic_const_exprs/ty-alias-substitution.rs
Rollup merge of #106709 - khuey:disable_split_dwarf_inlining_by_default, r=davidtwco
[rust.git] / tests / ui / const-generics / generic_const_exprs / ty-alias-substitution.rs
1 // check-pass
2 // Test that we correctly substitute generic arguments for type aliases.
3 #![feature(generic_const_exprs)]
4 #![allow(incomplete_features)]
5
6 type Alias<T, const N: usize> = [T; N + 1];
7
8 fn foo<const M: usize>() -> Alias<u32, M>  where [u8; M + 1]: Sized {
9     [0; M + 1]
10 }
11
12 fn main() {
13     foo::<0>();
14 }