1
Fork 0

use array_windows instead of windows in the compiler

This commit is contained in:
Bastian Kauschke 2020-09-17 09:28:14 +02:00
parent 255a4c58f5
commit 3435683fd5
11 changed files with 21 additions and 17 deletions

View file

@ -2419,7 +2419,7 @@ impl<'tcx> TyCtxt<'tcx> {
eps: &[ExistentialPredicate<'tcx>],
) -> &'tcx List<ExistentialPredicate<'tcx>> {
assert!(!eps.is_empty());
assert!(eps.windows(2).all(|w| w[0].stable_cmp(self, &w[1]) != Ordering::Greater));
assert!(eps.array_windows().all(|[a, b]| a.stable_cmp(self, b) != Ordering::Greater));
self._intern_existential_predicates(eps)
}