From e35acc2def70a02d0978876b4e17f1ce75783a0e Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 12 Oct 2023 15:36:14 +1100 Subject: [PATCH] Add spacing information to delimiters. This is an extension of the previous commit. It means the output of something like this: ``` stringify!(let a: Vec = vec![];) ``` goes from this: ``` let a: Vec = vec![] ; ``` With this PR, it now produces this string: ``` let a: Vec = vec![]; ``` --- clippy_lints/src/crate_in_macro_def.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clippy_lints/src/crate_in_macro_def.rs b/clippy_lints/src/crate_in_macro_def.rs index d4828778be2..b1aa472aa03 100644 --- a/clippy_lints/src/crate_in_macro_def.rs +++ b/clippy_lints/src/crate_in_macro_def.rs @@ -92,7 +92,7 @@ fn contains_unhygienic_crate_reference(tts: &TokenStream) -> Option { { return Some(span); } - if let TokenTree::Delimited(_, _, tts) = &curr { + if let TokenTree::Delimited(.., tts) = &curr { let span = contains_unhygienic_crate_reference(tts); if span.is_some() { return span;