drive-by: assert when iterating through InstantiatedPredicates
This commit is contained in:
parent
9b28edb6d7
commit
e1533a26f7
1 changed files with 2 additions and 0 deletions
|
@ -1264,6 +1264,7 @@ impl<'tcx> IntoIterator for InstantiatedPredicates<'tcx> {
|
|||
type IntoIter = std::iter::Zip<std::vec::IntoIter<Predicate<'tcx>>, std::vec::IntoIter<Span>>;
|
||||
|
||||
fn into_iter(self) -> Self::IntoIter {
|
||||
debug_assert_eq!(self.predicates.len(), self.spans.len());
|
||||
std::iter::zip(self.predicates, self.spans)
|
||||
}
|
||||
}
|
||||
|
@ -1277,6 +1278,7 @@ impl<'a, 'tcx> IntoIterator for &'a InstantiatedPredicates<'tcx> {
|
|||
>;
|
||||
|
||||
fn into_iter(self) -> Self::IntoIter {
|
||||
debug_assert_eq!(self.predicates.len(), self.spans.len());
|
||||
std::iter::zip(self.predicates.iter().copied(), self.spans.iter().copied())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue