Skip to content

Commit

Permalink
Update for latest master
Browse files Browse the repository at this point in the history
  • Loading branch information
trevyn committed Nov 27, 2023
1 parent bcd970d commit 8ca0939
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 5 additions & 3 deletions src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,11 @@ fn rewrite_macro_inner(
}

if Delimiter::Brace == style && context.config.format_brace_macros() {
if let ast::MacArgs::Delimited(span, ..) = *mac.args {
ts = TokenStream::new(vec![TokenTree::Delimited(span, Delimiter::Brace, ts)]);
}
ts = TokenStream::new(vec![TokenTree::Delimited(
mac.args.dspan,
Delimiter::Brace,
ts,
)]);
}

let ParsedMacroArgs {
Expand Down
3 changes: 1 addition & 2 deletions tests/source/configs/format_brace_macros/true.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ macro_rules! impl_from_vector {
*/

test_if! {
$test_tt:
interpolate_idents! {
$test_tt: interpolate_idents! {
mod [$id _from_ $source] {
use super::*;
#[test]
Expand Down

0 comments on commit 8ca0939

Please sign in to comment.