// { dg-additional-options "-w -frust-name-resolution-2.0" } #[lang = "sized"] trait Sized {} const M: usize = 4; struct Foo { value: [T; N], } fn main() { let foo = Foo:: { value: [15] }; let foo = Foo:: { value: [15, 13] }; let foo: Foo = Foo { value: [15, 13] }; let foo: Foo = Foo:: { value: [15, 13] }; let foo: Foo = Foo { value: [15, 13] }; let foo = Foo:: { value: [15, 13] }; let foo: Foo = Foo:: { value: [15, 13] }; let foo: Foo = Foo:: { value: [15, 13, 11, 9], }; // FIXME: Add proper const typecheck errors here let invalid_foo: Foo = Foo:: { value: [15, 13] }; let invalid_foo: Foo = Foo:: { value: [15, 13] }; let invalid_foo: Foo = Foo:: { value: [15, 13] }; }