diff options
| author | Nadrieril <nadrieril+git@gmail.com> | 2020-10-17 20:07:06 +0100 |
|---|---|---|
| committer | Nadrieril <nadrieril+git@gmail.com> | 2020-10-18 14:21:20 +0100 |
| commit | 99852e0db6cdb62894e87eae2a41310b8400a5bf (patch) | |
| tree | 2959cf638add25c159b9e9350eb29a8bc289e4a1 | |
| parent | c3d0445021ce6b4ee9dc96c6a4dab611402988d6 (diff) | |
| download | rust-99852e0db6cdb62894e87eae2a41310b8400a5bf.tar.gz rust-99852e0db6cdb62894e87eae2a41310b8400a5bf.zip | |
A ConstantValue constructor with a slice pattern is an error
| -rw-r--r-- | compiler/rustc_mir_build/src/thir/pattern/_match.rs | 1 |
1 files changed, 0 insertions, 1 deletions
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), }, |
