Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions compiler/rustc_mir_build/src/builder/matches/match_pair.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ impl<'tcx> MatchPairTree<'tcx> {
PatKind::AscribeUserType {
ascription: Ascription { ref annotation, variance },
ref subpattern,
..
} => {
MatchPairTree::for_pattern(
place_builder,
Expand All @@ -217,7 +216,15 @@ impl<'tcx> MatchPairTree<'tcx> {
None
}

PatKind::Binding { mode, var, is_shorthand, ref subpattern, .. } => {
PatKind::Binding {
name: _,
mode,
var,
ty: _,
ref subpattern,
is_primary: _,
is_shorthand,
} => {
// In order to please the borrow checker, when lowering a pattern
// like `x @ subpat` we must establish any bindings in `subpat`
// before establishing the binding for `x`.
Expand Down Expand Up @@ -263,8 +270,14 @@ impl<'tcx> MatchPairTree<'tcx> {
None
}

PatKind::ExpandedConstant { subpattern: ref pattern, .. } => {
MatchPairTree::for_pattern(place_builder, pattern, cx, &mut subpairs, extra_data);
PatKind::ExpandedConstant { def_id: _, ref subpattern } => {
MatchPairTree::for_pattern(
place_builder,
subpattern,
cx,
&mut subpairs,
extra_data,
);
None
}

Expand Down
Loading