aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-05-04 16:20:38 +0100
committerGitHub <[email protected]>2021-05-04 16:20:38 +0100
commitff78f3a56d7080a233a3446d153566c54bf62a68 (patch)
tree9ce56e77a468579f84c4e4dd3a7a7d1f2b67a5e8
parenta231da9d245dc280b082f2d8795f8e6bf16e409a (diff)
parent16f7c3ea916fd16d9d94d6703c3af38a32515f98 (diff)
Merge #8724
8724: minor: unconfuse myself about macro def vs macro rules r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
-rw-r--r--crates/hir_expand/src/db.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/hir_expand/src/db.rs b/crates/hir_expand/src/db.rs
index 1e4b0cc19..b77795b2e 100644
--- a/crates/hir_expand/src/db.rs
+++ b/crates/hir_expand/src/db.rs
@@ -27,10 +27,15 @@ const TOKEN_LIMIT: usize = 524288;
27 27
28#[derive(Debug, Clone, Eq, PartialEq)] 28#[derive(Debug, Clone, Eq, PartialEq)]
29pub enum TokenExpander { 29pub enum TokenExpander {
30 /// Old-style `macro_rules`.
30 MacroRules(mbe::MacroRules), 31 MacroRules(mbe::MacroRules),
32 /// AKA macros 2.0.
31 MacroDef(mbe::MacroDef), 33 MacroDef(mbe::MacroDef),
34 /// Stuff like `line!` and `file!`.
32 Builtin(BuiltinFnLikeExpander), 35 Builtin(BuiltinFnLikeExpander),
36 /// `derive(Copy)` and such.
33 BuiltinDerive(BuiltinDeriveExpander), 37 BuiltinDerive(BuiltinDeriveExpander),
38 /// The thing we love the most here in rust-analyzer -- procedural macros.
34 ProcMacro(ProcMacroExpander), 39 ProcMacro(ProcMacroExpander),
35} 40}
36 41