about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/attr_wrapper.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-09-06 18:16:06 +0000
committerbors <bors@rust-lang.org>2023-09-06 18:16:06 +0000
commit4e2116296cf48022e8be4caac71a7796015aa3d7 (patch)
tree35481463ac97a31c378f4ccf8cbe44b087b85404 /compiler/rustc_parse/src/parser/attr_wrapper.rs
parenta5b2ac6906d2b688db4938f842057cde6054449c (diff)
parent1d3451d4950b3eafb854481de7d58878ae48dffd (diff)
downloadrust-4e2116296cf48022e8be4caac71a7796015aa3d7.tar.gz
rust-4e2116296cf48022e8be4caac71a7796015aa3d7.zip
Auto merge of #115615 - matthiaskrgr:rollup-49fosdf, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #114511 (Remove the unhelpful let binding diag comes from FormatArguments)
 - #115473 (Add explanatory note to 'expected item' error)
 - #115574 (Replace `rustc_data_structures` dependency with `rustc_index` in `rustc_parse_format`)
 - #115578 (Clarify cryptic comments)
 - #115587 (fix #115348)
 - #115596 (A small change)
 - #115598 (Fix log formatting in bootstrap)
 - #115605 (Better Debug for `Ty` in smir)
 - #115614 (Fix minor grammar typo)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src/parser/attr_wrapper.rs')
-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)
                 }))