//@ check-pass struct Generic(T); impl Generic { const ARRAY: [T; 0] = []; const NEWTYPE_ARRAY: Generic<[T; 0]> = Generic([]); const ARRAY_FIELD: Generic<(i32, [T; 0])> = Generic((0, [])); } pub const fn array() -> &'static T { #[allow(unconditional_panic)] &Generic::::ARRAY[0] } pub const fn newtype_array() -> &'static T { &Generic::::NEWTYPE_ARRAY.0[0] } pub const fn array_field() -> &'static T { &(Generic::::ARRAY_FIELD.0).1[0] } fn main() {}