diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:11:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:13:23 +0000 |
commit | 20431706a863f92cb37dc512fef6e48d192aaf2c (patch) | |
tree | 2867f13f5fd5437ba628c67d7f87309ccadcd286 /vendor/syn/src/item.rs | |
parent | Releasing progress-linux version 1.65.0+dfsg1-2~progress7.99u1. (diff) | |
download | rustc-20431706a863f92cb37dc512fef6e48d192aaf2c.tar.xz rustc-20431706a863f92cb37dc512fef6e48d192aaf2c.zip |
Merging upstream version 1.66.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/syn/src/item.rs')
-rw-r--r-- | vendor/syn/src/item.rs | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/vendor/syn/src/item.rs b/vendor/syn/src/item.rs index 1ce970ee2..a1ef7ab43 100644 --- a/vendor/syn/src/item.rs +++ b/vendor/syn/src/item.rs @@ -2765,7 +2765,6 @@ mod printing { use super::*; use crate::attr::FilterAttrs; use crate::print::TokensOrDefault; - use crate::punctuated::Pair; use proc_macro2::TokenStream; use quote::{ToTokens, TokenStreamExt}; @@ -3283,16 +3282,9 @@ mod printing { self.generics.to_tokens(tokens); self.paren_token.surround(tokens, |tokens| { let mut last_is_variadic = false; - for input in self.inputs.pairs() { - match input { - Pair::Punctuated(input, comma) => { - maybe_variadic_to_tokens(input, tokens); - comma.to_tokens(tokens); - } - Pair::End(input) => { - last_is_variadic = maybe_variadic_to_tokens(input, tokens); - } - } + for pair in self.inputs.pairs() { + last_is_variadic = maybe_variadic_to_tokens(pair.value(), tokens); + pair.punct().to_tokens(tokens); } if self.variadic.is_some() && !last_is_variadic { if !self.inputs.empty_or_trailing() { |