Skip to content

Commit 9a786d0

Browse files
committed
Support derive-macros for rename prefix magic
1 parent 96c4455 commit 9a786d0

File tree

4 files changed

+211
-117
lines changed

4 files changed

+211
-117
lines changed

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ smol_str.opt-level = 3
2121
text-size.opt-level = 3
2222
serde.opt-level = 3
2323
salsa.opt-level = 3
24+
dissimilar.opt-level = 3
25+
2426
# This speeds up `cargo xtask dist`.
2527
miniz_oxide.opt-level = 3
2628

crates/hir-def/src/dyn_map.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,14 @@ pub mod keys {
6767
pub const PROC_MACRO: Key<ast::Fn, ProcMacroId> = Key::new();
6868
pub const MACRO_CALL: Key<ast::MacroCall, MacroCallId> = Key::new();
6969
pub const ATTR_MACRO_CALL: Key<ast::Item, MacroCallId> = Key::new();
70-
pub const DERIVE_MACRO_CALL: Key<ast::Attr, (AttrId, MacroCallId, Box<[Option<MacroCallId>]>)> =
71-
Key::new();
70+
pub const DERIVE_MACRO_CALL: Key<
71+
ast::Attr,
72+
(
73+
AttrId,
74+
/* derive() */ MacroCallId,
75+
/* actual derive macros */ Box<[Option<MacroCallId>]>,
76+
),
77+
> = Key::new();
7278

7379
/// XXX: AST Nodes and SyntaxNodes have identity equality semantics: nodes are
7480
/// equal if they point to exactly the same object.

0 commit comments

Comments
 (0)