Open stephanemagnenat opened 1 year ago
This macro:
macro_rules! test_macro { ($member:ident $($rest:tt)*) => { paste::paste! {fn test(&self) { (self.$member$($rest)* ) }} }; }
gets wrongly reformatted as:
macro_rules! test_macro { ($member:ident $($rest:tt)*) => { paste::paste! {fn test(&self) { (self.$$member($rest)* ) }} }; }
The diff being:
4c4 < (self.$member$($rest)* ) --- > (self.$$member($rest)* )
The version being: rustfmt 1.6.0-stable (5680fa1 2023-08-23)
rustfmt 1.6.0-stable (5680fa1 2023-08-23)
Note that if there is a space after the first argument: self.$member $($rest)* then rustfmt doesn't produce the erroneous output.
self.$member $($rest)*
@rustbot claim
This macro:
gets wrongly reformatted as:
The diff being:
The version being:
rustfmt 1.6.0-stable (5680fa1 2023-08-23)