diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-24 08:17:02 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-24 08:17:02 +0000 |
commit | f2c36e5a6f5892532dec9e6523dc0944453a384f (patch) | |
tree | 6ad67c7948d081c31d3a0ab05311862677bc0527 /crates/ra_hir_expand/src/lib.rs | |
parent | 1aded342266f18b519666ac512e77b0c211fff5d (diff) | |
parent | 16854e28ef1f2010d7d7d8e959a193fbcaeb5be8 (diff) |
Merge #2360
2360: Refactor builtin macro r=matklad a=edwin0cheng
Refactor builtin macro and add some local tests.
Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates/ra_hir_expand/src/lib.rs')
-rw-r--r-- | crates/ra_hir_expand/src/lib.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/ra_hir_expand/src/lib.rs b/crates/ra_hir_expand/src/lib.rs index 126d12fbb..4f3ccf1d0 100644 --- a/crates/ra_hir_expand/src/lib.rs +++ b/crates/ra_hir_expand/src/lib.rs | |||
@@ -24,7 +24,10 @@ use ra_syntax::{ | |||
24 | }; | 24 | }; |
25 | 25 | ||
26 | use crate::ast_id_map::FileAstId; | 26 | use crate::ast_id_map::FileAstId; |
27 | use crate::builtin_macro::BuiltinExpander; | 27 | use crate::builtin_macro::BuiltinFnLikeExpander; |
28 | |||
29 | #[cfg(test)] | ||
30 | mod test_db; | ||
28 | 31 | ||
29 | /// Input to the analyzer is a set of files, where each file is identified by | 32 | /// Input to the analyzer is a set of files, where each file is identified by |
30 | /// `FileId` and contains source code. However, another source of source code in | 33 | /// `FileId` and contains source code. However, another source of source code in |
@@ -135,7 +138,7 @@ pub struct MacroDefId { | |||
135 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | 138 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] |
136 | pub enum MacroDefKind { | 139 | pub enum MacroDefKind { |
137 | Declarative, | 140 | Declarative, |
138 | BuiltIn(BuiltinExpander), | 141 | BuiltIn(BuiltinFnLikeExpander), |
139 | } | 142 | } |
140 | 143 | ||
141 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 144 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |