diff --git a/tests/debug/mod.rs b/tests/debug/mod.rs index b6de67e1f7..c9925a6d5c 100644 --- a/tests/debug/mod.rs +++ b/tests/debug/mod.rs @@ -11,7 +11,7 @@ use proc_macro2::{Ident, Literal, TokenStream}; use ref_cast::RefCast; use std::fmt::{self, Debug}; use std::ops::Deref; -use syn::punctuated::{self, Punctuated}; +use syn::punctuated::Punctuated; #[derive(RefCast)] #[repr(transparent)] @@ -128,22 +128,6 @@ where } } -impl<'a, T, P> Debug for Lite> -where - Lite: Debug, - Lite

: Debug, -{ - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut list = formatter.debug_list(); - for pair in self.value.clone() { - let (node, punct) = pair.into_tuple(); - list.entry(Lite(node)); - list.entries(punct.map(Lite)); - } - list.finish() - } -} - struct Present; impl Debug for Present { diff --git a/tests/test_parse_quote.rs b/tests/test_parse_quote.rs index 9eaab41e25..73aae709af 100644 --- a/tests/test_parse_quote.rs +++ b/tests/test_parse_quote.rs @@ -113,7 +113,7 @@ fn test_pat() { #[test] fn test_punctuated() { let punctuated: Punctuated = parse_quote!(true | true); - snapshot!(punctuated.pairs(), @r###" + snapshot!(punctuated, @r###" [ Lit::Bool { value: true, @@ -126,7 +126,7 @@ fn test_punctuated() { "###); let punctuated: Punctuated = parse_quote!(true | true |); - snapshot!(punctuated.pairs(), @r###" + snapshot!(punctuated, @r###" [ Lit::Bool { value: true,