rust/crates
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
..
base_db Add test for giving attribute proc macros valid syntax 2022-02-07 12:54:08 +01:00
cfg Bump MSRV (1.57) 2021-12-16 01:56:12 +05:00
flycheck Bump MSRV (1.57) 2021-12-16 01:56:12 +05:00
hir Simplify 2022-03-09 11:26:06 +01:00
hir_def Merge #11663 2022-03-09 10:26:34 +00:00
hir_expand Merge #11663 2022-03-09 10:26:34 +00:00
hir_ty Merge #11663 2022-03-09 10:26:34 +00:00
ide Merge #11663 2022-03-09 10:26:34 +00:00
ide_assists Move ide crates to new hir::Macro 2022-03-08 23:52:26 +01:00
ide_completion Add data queries for macros 2022-03-09 00:41:54 +01:00
ide_db fix symbol index collection not collecting legacy macros 2022-03-09 01:44:20 +01:00
ide_diagnostics internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00
ide_ssr Disable one of the failing SSR test cases 2022-03-09 02:08:44 +01:00
limit Use compare_exchange_weak in limit::Limit::check 2022-01-28 18:19:35 +03:00
mbe Do not consider _ to be an expression for macro_rules! 2022-03-02 01:51:25 +00:00
parser Bring back syntax highlighting in test data 2022-03-06 08:43:18 +00:00
paths Bump MSRV (1.57) 2021-12-16 01:56:12 +05:00
proc_macro_api Set current working directory for procedural macros 2022-01-27 16:18:12 +03:00
proc_macro_srv fix: Fix proc-macro server not using the supplied span in Ident::new 2022-01-31 17:02:57 +01:00
proc_macro_test Bump MSRV (1.57) 2021-12-16 01:56:12 +05:00
profile Generate AnyHasDocComments node 2022-01-07 12:38:18 +01:00
project_model Pass required features to cargo when using run action 2022-02-06 19:02:25 +03:00
rust-analyzer Add back colons around inlay hints 2022-03-08 12:01:02 +02:00
sourcegen Bump MSRV (1.57) 2021-12-16 01:56:12 +05:00
stdx Generate AnyHasDocComments node 2022-01-07 12:38:18 +01:00
syntax Highlight Self as a keyword by default 2022-03-06 00:13:45 +01:00
test_utils fix: Do not complete Drop::drop, complete std::mem::drop instead 2021-12-22 02:25:38 +01:00
text_edit redirct: use iterators and knowledge about preordered arrays for more efficient merging 2022-02-28 05:56:51 +01:00
toolchain Bump MSRV (1.57) 2021-12-16 01:56:12 +05:00
tt Track synthetic tokens, to be able to remove them again later 2022-02-08 18:13:18 +01:00
vfs Bump MSRV (1.57) 2021-12-16 01:56:12 +05:00
vfs-notify Bump MSRV (1.57) 2021-12-16 01:56:12 +05:00