// check-pass enum ConstGenericEnum { Foo([i32; N]), Bar, } fn foo(val: &ConstGenericEnum) { if let ConstGenericEnum::::Foo(field, ..) = val {} } fn bar(val: &ConstGenericEnum) { match val { ConstGenericEnum::::Foo(field, ..) => (), ConstGenericEnum::::Bar => (), } } fn main() { match ConstGenericEnum::Bar { ConstGenericEnum::<3>::Foo(field, ..) => (), ConstGenericEnum::<3>::Bar => (), } }