Fix incorrect ordering

I introduced this mistake in 175976e2a2
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.
This commit is contained in:
Nadrieril 2020-05-06 12:11:52 +01:00
parent 34cce58d81
commit e65d49d338

View file

@ -1033,7 +1033,7 @@ impl<'tcx> Constructor<'tcx> {
/// Like `apply`, but where all the subpatterns are wildcards `_`.
fn apply_wildcards<'a>(&self, cx: &MatchCheckCtxt<'a, 'tcx>, ty: Ty<'tcx>) -> Pat<'tcx> {
let subpatterns = self.wildcard_subpatterns(cx, ty).into_iter().rev();
let subpatterns = self.wildcard_subpatterns(cx, ty).into_iter();
self.apply(cx, ty, subpatterns)
}
}