mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Store an AstId
for procedural macros
This commit is contained in:
parent
3ab9b39dd4
commit
c05a1a6e37
11 changed files with 47 additions and 26 deletions
|
@ -245,7 +245,7 @@ impl MacroDefId {
|
|||
MacroDefKind::BuiltIn(_, id) => id,
|
||||
MacroDefKind::BuiltInDerive(_, id) => id,
|
||||
MacroDefKind::BuiltInEager(_, id) => id,
|
||||
MacroDefKind::ProcMacro(_) => return None,
|
||||
MacroDefKind::ProcMacro(..) => return None,
|
||||
};
|
||||
Some(*id)
|
||||
}
|
||||
|
@ -258,7 +258,7 @@ pub enum MacroDefKind {
|
|||
// FIXME: maybe just Builtin and rename BuiltinFnLikeExpander to BuiltinExpander
|
||||
BuiltInDerive(BuiltinDeriveExpander, AstId<ast::Macro>),
|
||||
BuiltInEager(EagerExpander, AstId<ast::Macro>),
|
||||
ProcMacro(ProcMacroExpander),
|
||||
ProcMacro(ProcMacroExpander, AstId<ast::Fn>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue