Use iter::zip in compiler/
This commit is contained in:
parent
3b1f5e3462
commit
72ebebe474
87 changed files with 213 additions and 204 deletions
|
@ -116,6 +116,8 @@ use rustc_span::{symbol::MacroRulesNormalizedIdent, MultiSpan, Span};
|
|||
|
||||
use smallvec::SmallVec;
|
||||
|
||||
use std::iter;
|
||||
|
||||
/// Stack represented as linked list.
|
||||
///
|
||||
/// Those are used for environments because they grow incrementally and are not mutable.
|
||||
|
@ -204,7 +206,7 @@ pub(super) fn check_meta_variables(
|
|||
sess.span_diagnostic.span_bug(span, "length mismatch between LHSes and RHSes")
|
||||
}
|
||||
let mut valid = true;
|
||||
for (lhs, rhs) in lhses.iter().zip(rhses.iter()) {
|
||||
for (lhs, rhs) in iter::zip(lhses, rhses) {
|
||||
let mut binders = Binders::default();
|
||||
check_binders(sess, node_id, lhs, &Stack::Empty, &mut binders, &Stack::Empty, &mut valid);
|
||||
check_occurrences(sess, node_id, rhs, &Stack::Empty, &binders, &Stack::Empty, &mut valid);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue