Skip to content

Commit

Permalink
Add spacing information to delimiters.
Browse files Browse the repository at this point in the history
This is an extension of the previous commit. It means the output of
something like this:
```
stringify!(let a: Vec<u32> = vec![];)
```
goes from this:
```
let a: Vec<u32> = vec![] ;
```
With this PR, it now produces this string:
```
let a: Vec<u32> = vec![];
```
  • Loading branch information
nnethercote committed Dec 10, 2023
1 parent 0109fa6 commit e35acc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clippy_lints/src/crate_in_macro_def.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ fn contains_unhygienic_crate_reference(tts: &TokenStream) -> Option<Span> {
{
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;
Expand Down

0 comments on commit e35acc2

Please sign in to comment.