We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a1d20cf commit 300901bCopy full SHA for 300901b
compiler/rustc_session/src/parse.rs
@@ -330,10 +330,7 @@ impl ParseSess {
330
pub fn proc_macro_quoted_spans(&self) -> impl Iterator<Item = (usize, Span)> + '_ {
331
// This is equivalent to `.iter().copied().enumerate()`, but that isn't possible for
332
// AppendOnlyVec, so we resort to this scheme.
333
- (0..)
334
- .map(|i| (i, self.proc_macro_quoted_spans.get(i)))
335
- .take_while(|(_, o)| o.is_some())
336
- .filter_map(|(i, o)| Some((i, o?)))
+ self.proc_macro_quoted_spans.iter_enumerated()
337
}
338
339
#[track_caller]
0 commit comments