diff options
| author | bors <bors@rust-lang.org> | 2025-04-14 03:56:55 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-04-14 03:56:55 +0000 |
| commit | f836ae4e663b6e8938096b8559e094d18361be55 (patch) | |
| tree | 210d28f13b7c2f09b8cc78ef0c4c146c0cc28322 /compiler/rustc_parse/src/parser/attr_wrapper.rs | |
| parent | 15f58c46da79399961a09db0c650a2f90f442e6b (diff) | |
| parent | 1830245a224c523f86ad3c62be76be3f336a9fb0 (diff) | |
| download | rust-f836ae4e663b6e8938096b8559e094d18361be55.tar.gz rust-f836ae4e663b6e8938096b8559e094d18361be55.zip | |
Auto merge of #124141 - nnethercote:rm-Nonterminal-and-TokenKind-Interpolated, r=petrochenkov
Remove `Nonterminal` and `TokenKind::Interpolated` A third attempt at this; the first attempt was #96724 and the second was #114647. r? `@ghost`
Diffstat (limited to 'compiler/rustc_parse/src/parser/attr_wrapper.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/attr_wrapper.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/attr_wrapper.rs b/compiler/rustc_parse/src/parser/attr_wrapper.rs index cff998fa137..f1bd6a22730 100644 --- a/compiler/rustc_parse/src/parser/attr_wrapper.rs +++ b/compiler/rustc_parse/src/parser/attr_wrapper.rs @@ -120,7 +120,7 @@ impl ToAttrTokenStream for LazyAttrTokenStreamImpl { // produce an empty `TokenStream` if no calls were made, and omit the // final token otherwise. let mut cursor_snapshot = self.cursor_snapshot.clone(); - let tokens = iter::once(FlatToken::Token(self.start_token.clone())) + let tokens = iter::once(FlatToken::Token(self.start_token)) .chain(iter::repeat_with(|| FlatToken::Token(cursor_snapshot.next()))) .take(self.num_calls as usize); @@ -186,7 +186,7 @@ impl ToAttrTokenStream for LazyAttrTokenStreamImpl { impl<'a> Parser<'a> { pub(super) fn collect_pos(&self) -> CollectPos { CollectPos { - start_token: (self.token.clone(), self.token_spacing), + start_token: (self.token, self.token_spacing), cursor_snapshot: self.token_cursor.clone(), start_pos: self.num_bump_calls, } |
