]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/const-types.rs
Auto merge of #79578 - alexcrichton:update-waasi, r=KodrAus
[rust.git] / src / test / ui / const-generics / const-types.rs
1 // Check that arrays can be used with generic const and type.
2 // run-pass
3 // revisions: full min
4
5 #![cfg_attr(full, feature(const_generics))]
6 #![cfg_attr(full, allow(incomplete_features))]
7
8 #![allow(dead_code, unused_variables)]
9
10 struct ConstArray<T, const LEN: usize> {
11     array: [T; LEN],
12 }
13
14 fn main() {
15     let arr = ConstArray::<i32, 8> {
16         array: [0; 8],
17     };
18 }