rust/tests/ui/const-generics/array-wrapper-struct-ctor.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
237 B
Rust
Raw Normal View History

// run-pass
#![allow(dead_code)]
struct ArrayStruct<T, const N: usize> {
data: [T; N],
}
struct ArrayTuple<T, const N: usize>([T; N]);
fn main() {
let _ = ArrayStruct { data: [0u32; 8] };
let _ = ArrayTuple([0u32; 8]);
}