Merge tuple and struct pattern generation.
This commit is contained in:
parent
10b3595ba6
commit
b54f122a1c
1 changed files with 1 additions and 5 deletions
|
@ -279,11 +279,7 @@ impl<'a, 'tcx> ConstToPat<'a, 'tcx> {
|
|||
subpatterns: field_pats(destructured.fields),
|
||||
}
|
||||
}
|
||||
ty::Adt(_, _) => {
|
||||
let destructured = tcx.destructure_const(param_env.and(cv));
|
||||
PatKind::Leaf { subpatterns: field_pats(destructured.fields) }
|
||||
}
|
||||
ty::Tuple(_) => {
|
||||
ty::Tuple(_) | ty::Adt(_, _) => {
|
||||
let destructured = tcx.destructure_const(param_env.and(cv));
|
||||
PatKind::Leaf { subpatterns: field_pats(destructured.fields) }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue