]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/generic_const_exprs/ty-alias-substitution.rs
Merge commit '7f27e2e74ef957baa382dc05cf08df6368165c74' into clippyup
[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 }