mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 01:05:39 +03:00
16 lines
442 B
Rust
16 lines
442 B
Rust
// 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)]
|
|
|
|
struct S;
|
|
|
|
fn main() {
|
|
let _b = [0; S];
|
|
//~^ ERROR the constant `S` is not of type `usize`
|
|
}
|