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

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

14 lines
363 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 Const<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 MyConst = Const<{ [] }>;
fn main() {
let _x = Const::<{ [] }> {};
let _y = MyConst {};
}