mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-29 02:52:11 +00:00
Support derive-macros for rename prefix magic
This commit is contained in:
parent
96c4455114
commit
9a786d0008
4 changed files with 211 additions and 117 deletions
|
|
@ -67,8 +67,14 @@ pub mod keys {
|
|||
pub const PROC_MACRO: Key<ast::Fn, ProcMacroId> = Key::new();
|
||||
pub const MACRO_CALL: Key<ast::MacroCall, MacroCallId> = Key::new();
|
||||
pub const ATTR_MACRO_CALL: Key<ast::Item, MacroCallId> = Key::new();
|
||||
pub const DERIVE_MACRO_CALL: Key<ast::Attr, (AttrId, MacroCallId, Box<[Option<MacroCallId>]>)> =
|
||||
Key::new();
|
||||
pub const DERIVE_MACRO_CALL: Key<
|
||||
ast::Attr,
|
||||
(
|
||||
AttrId,
|
||||
/* derive() */ MacroCallId,
|
||||
/* actual derive macros */ Box<[Option<MacroCallId>]>,
|
||||
),
|
||||
> = Key::new();
|
||||
|
||||
/// XXX: AST Nodes and SyntaxNodes have identity equality semantics: nodes are
|
||||
/// equal if they point to exactly the same object.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue