Skip to content

Commit

Permalink
Fix incorrect ordering
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Nadrieril committed May 17, 2020
1 parent 34cce58 commit e65d49d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_mir_build/hair/pattern/_match.rs
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit e65d49d

Please sign in to comment.