From 99852e0db6cdb62894e87eae2a41310b8400a5bf Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sat, 17 Oct 2020 20:07:06 +0100 Subject: [PATCH] A ConstantValue constructor with a slice pattern is an error --- compiler/rustc_mir_build/src/thir/pattern/_match.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/compiler/rustc_mir_build/src/thir/pattern/_match.rs b/compiler/rustc_mir_build/src/thir/pattern/_match.rs index 9ca711722a3..d16ba191681 100644 --- a/compiler/rustc_mir_build/src/thir/pattern/_match.rs +++ b/compiler/rustc_mir_build/src/thir/pattern/_match.rs @@ -2559,7 +2559,6 @@ fn specialize_one_pattern<'p, 'tcx>( let suffix = suffix.iter().enumerate().map(|(i, p)| (arity - suffix.len() + i, p)); Some(ctor_wild_subpatterns.replace_fields_indexed(prefix.chain(suffix))) } - ConstantValue(_) => None, _ => span_bug!(pat.span, "unexpected ctor {:?} for slice pat", constructor), },