blob: e8f4a806e384706ae444c13662f1f4523c8cac2c [file]
// Regression test for https://github.com/rust-lang/rust/issues/141738
//
// Using a struct constructor as an array repeat count with
// `min_generic_const_args` used to ICE with "unexpected `DefKind`
// for const alias to resolve to: Ctor(Struct, Const)".
// It should now produce a proper type error.
#![feature(min_generic_const_args, macroless_generic_const_args)]
struct S;
fn main() {
let _b = [0; S];
//~^ ERROR the constant `S` is not of type `usize`
}