rust-analyzer/crates/hir_expand
bors[bot] d70ea759b3
Merge #11663
11663: Internal: Add hir_def::MacroId, add Macro{Id} to ModuleDef{Id} r=Veykril a=Veykril

With this we can now handle macros like we handle ModuleDefs making them work more like other definitions and allowing us to remove a bunch of special cases. This also enables us to track the modules these macros are defined in, instead of only recording the crate they come from.

Introduces a new class of `MacroId`s (for each of the 3 macro kinds) into `hir_def`. We can't reuse `MacroDefId` as that is defined in `hir_expand` which doesn't know of modules, so now we have two different macro ids, this unfortunately requires some back and forth mapping between the two via database accesses which I hope won't be too expensive.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-03-09 10:26:34 +00:00
..
src Merge #11663 2022-03-09 10:26:34 +00:00
Cargo.toml Actually check in fixup.rs 2022-02-07 20:30:28 +01:00