Unnamed repository; edit this file 'description' to name the repository.
Adapt macros in rust-analyzer to new attribute
`match_ast!` cannot be ported because of a weird compiler bug: https://github.com/rust-lang/rust/issues/150518.
Chayim Refael Friedman 4 months ago
parent 55a083c · commit 08ab442
-rw-r--r--crates/tt/src/lib.rs2
-rw-r--r--crates/tt/src/storage.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/tt/src/lib.rs b/crates/tt/src/lib.rs
index a59fc2e089..72b0d762ef 100644
--- a/crates/tt/src/lib.rs
+++ b/crates/tt/src/lib.rs
@@ -129,7 +129,7 @@ impl Subtree {
}
}
-/// `dispatch_ref! {}`
+#[rust_analyzer::macro_style(braces)]
macro_rules! dispatch_ref {
(
match $scrutinee:expr => $tt:ident => $body:expr
diff --git a/crates/tt/src/storage.rs b/crates/tt/src/storage.rs
index 62d2e20016..4dd02d875a 100644
--- a/crates/tt/src/storage.rs
+++ b/crates/tt/src/storage.rs
@@ -353,7 +353,7 @@ const _: () = {
assert!(size_of::<TokenTree<SpanStorage96>>() == 32);
};
-/// `dispatch! {}`
+#[rust_analyzer::macro_style(braces)]
macro_rules! dispatch {
(
match $scrutinee:expr => $tt:ident => $body:expr
@@ -561,7 +561,7 @@ impl TopSubtree {
}
}
-/// `dispatch_builder! {}`
+#[rust_analyzer::macro_style(braces)]
macro_rules! dispatch_builder {
(
match $scrutinee:expr => $tt:ident => $body:expr