about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-09-06 19:31:50 +0200
committerGitHub <noreply@github.com>2023-09-06 19:31:50 +0200
commitda44234b647115d9056622ef786fe875d1bb684d (patch)
tree38b66ae2254038bc4be50f80709e376d0c0680c0 /compiler/rustc_parse/src/parser
parent3e42a12a54df8e3ff4c70441d77a34b4dd104b26 (diff)
parent42dbc72d7bb0645292d72816d768d1f5365a58ca (diff)
downloadrust-da44234b647115d9056622ef786fe875d1bb684d.tar.gz
rust-da44234b647115d9056622ef786fe875d1bb684d.zip
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`
Diffstat (limited to 'compiler/rustc_parse/src/parser')
-rw-r--r--compiler/rustc_parse/src/parser/attr_wrapper.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/attr_wrapper.rs b/compiler/rustc_parse/src/parser/attr_wrapper.rs
index 5d6c574baa6..c4e8d9006e6 100644
--- a/compiler/rustc_parse/src/parser/attr_wrapper.rs
+++ b/compiler/rustc_parse/src/parser/attr_wrapper.rs
@@ -106,7 +106,7 @@ impl ToAttrTokenStream for LazyAttrTokenStreamImpl {
         let mut cursor_snapshot = self.cursor_snapshot.clone();
         let tokens =
             std::iter::once((FlatToken::Token(self.start_token.0.clone()), self.start_token.1))
-                .chain((0..self.num_calls).map(|_| {
+                .chain(std::iter::repeat_with(|| {
                     let token = cursor_snapshot.next();
                     (FlatToken::Token(token.0), token.1)
                 }))