]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/issues/issue-68615-array.rs
Rollup merge of #106707 - ehuss:remove-dupe-sha-1, r=Mark-Simulacrum
[rust.git] / tests / ui / const-generics / issues / issue-68615-array.rs
1 // [full] check-pass
2 // revisions: full min
3 #![cfg_attr(full, feature(adt_const_params))]
4 #![cfg_attr(full, allow(incomplete_features))]
5
6 struct Foo<const V: [usize; 0] > {}
7 //[min]~^ ERROR `[usize; 0]` is forbidden as the type of a const generic parameter
8
9 type MyFoo = Foo<{ [] }>;
10
11 fn main() {
12     let _ = Foo::<{ [] }> {};
13 }