rust/tests/ui/const-generics/issues/issue-68615-array.rs

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

14 lines
329 B
Rust
Raw Normal View History

// [full] check-pass
// revisions: full min
#![cfg_attr(full, feature(adt_const_params))]
#![cfg_attr(full, allow(incomplete_features))]
2020-04-11 11:05:02 -05:00
struct Foo<const V: [usize; 0] > {}
//[min]~^ ERROR `[usize; 0]` is forbidden as the type of a const generic parameter
2020-04-11 11:05:02 -05:00
type MyFoo = Foo<{ [] }>;
fn main() {
let _ = Foo::<{ [] }> {};
}