Skip to content

Commit e65d49d

Browse files
committed
Fix incorrect ordering
I introduced this mistake in 175976e and I can't quite remember what the reasoning was back then. I think I modeled it on `apply_constructor`, not realizing there was an important difference in the order in which fields were stored.
1 parent 34cce58 commit e65d49d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_mir_build/hair/pattern/_match.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@ impl<'tcx> Constructor<'tcx> {
10331033

10341034
/// Like `apply`, but where all the subpatterns are wildcards `_`.
10351035
fn apply_wildcards<'a>(&self, cx: &MatchCheckCtxt<'a, 'tcx>, ty: Ty<'tcx>) -> Pat<'tcx> {
1036-
let subpatterns = self.wildcard_subpatterns(cx, ty).into_iter().rev();
1036+
let subpatterns = self.wildcard_subpatterns(cx, ty).into_iter();
10371037
self.apply(cx, ty, subpatterns)
10381038
}
10391039
}

0 commit comments

Comments
 (0)