Skip to content

Commit 08ab442

Browse files
Adapt macros in rust-analyzer to new attribute
`match_ast!` cannot be ported because of a weird compiler bug: rust-lang/rust#150518.
1 parent 55a083c commit 08ab442

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

crates/tt/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ impl Subtree {
129129
}
130130
}
131131

132-
/// `dispatch_ref! {}`
132+
#[rust_analyzer::macro_style(braces)]
133133
macro_rules! dispatch_ref {
134134
(
135135
match $scrutinee:expr => $tt:ident => $body:expr

crates/tt/src/storage.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ const _: () = {
353353
assert!(size_of::<TokenTree<SpanStorage96>>() == 32);
354354
};
355355

356-
/// `dispatch! {}`
356+
#[rust_analyzer::macro_style(braces)]
357357
macro_rules! dispatch {
358358
(
359359
match $scrutinee:expr => $tt:ident => $body:expr
@@ -561,7 +561,7 @@ impl TopSubtree {
561561
}
562562
}
563563

564-
/// `dispatch_builder! {}`
564+
#[rust_analyzer::macro_style(braces)]
565565
macro_rules! dispatch_builder {
566566
(
567567
match $scrutinee:expr => $tt:ident => $body:expr

0 commit comments

Comments
 (0)