Skip to content

Commit da44234

Browse files
authored
Rollup merge of #115596 - nnethercote:two-small-changes, r=lqd
A small change A small change I made while poking around the code. r? `@lqd`
2 parents 3e42a12 + 42dbc72 commit da44234

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_parse/src/parser/attr_wrapper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ impl ToAttrTokenStream for LazyAttrTokenStreamImpl {
106106
let mut cursor_snapshot = self.cursor_snapshot.clone();
107107
let tokens =
108108
std::iter::once((FlatToken::Token(self.start_token.0.clone()), self.start_token.1))
109-
.chain((0..self.num_calls).map(|_| {
109+
.chain(std::iter::repeat_with(|| {
110110
let token = cursor_snapshot.next();
111111
(FlatToken::Token(token.0), token.1)
112112
}))

0 commit comments

Comments
 (0)