diff options
Diffstat (limited to 'crates/hir_expand/src')
-rw-r--r-- | crates/hir_expand/src/db.rs | 6 | ||||
-rw-r--r-- | crates/hir_expand/src/lib.rs | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/crates/hir_expand/src/db.rs b/crates/hir_expand/src/db.rs index 36d3307a1..a9099eb22 100644 --- a/crates/hir_expand/src/db.rs +++ b/crates/hir_expand/src/db.rs | |||
@@ -88,7 +88,7 @@ pub trait AstDatabase: SourceDatabase { | |||
88 | #[salsa::transparent] | 88 | #[salsa::transparent] |
89 | fn macro_arg(&self, id: MacroCallId) -> Option<Arc<(tt::Subtree, mbe::TokenMap)>>; | 89 | fn macro_arg(&self, id: MacroCallId) -> Option<Arc<(tt::Subtree, mbe::TokenMap)>>; |
90 | fn macro_def(&self, id: MacroDefId) -> Option<Arc<(TokenExpander, mbe::TokenMap)>>; | 90 | fn macro_def(&self, id: MacroDefId) -> Option<Arc<(TokenExpander, mbe::TokenMap)>>; |
91 | fn parse_macro( | 91 | fn parse_macro_expansion( |
92 | &self, | 92 | &self, |
93 | macro_file: MacroFile, | 93 | macro_file: MacroFile, |
94 | ) -> MacroResult<(Parse<SyntaxNode>, Arc<mbe::TokenMap>)>; | 94 | ) -> MacroResult<(Parse<SyntaxNode>, Arc<mbe::TokenMap>)>; |
@@ -283,12 +283,12 @@ fn parse_or_expand(db: &dyn AstDatabase, file_id: HirFileId) -> Option<SyntaxNod | |||
283 | match file_id.0 { | 283 | match file_id.0 { |
284 | HirFileIdRepr::FileId(file_id) => Some(db.parse(file_id).tree().syntax().clone()), | 284 | HirFileIdRepr::FileId(file_id) => Some(db.parse(file_id).tree().syntax().clone()), |
285 | HirFileIdRepr::MacroFile(macro_file) => { | 285 | HirFileIdRepr::MacroFile(macro_file) => { |
286 | db.parse_macro(macro_file).map(|(it, _)| it.syntax_node()).value | 286 | db.parse_macro_expansion(macro_file).map(|(it, _)| it.syntax_node()).value |
287 | } | 287 | } |
288 | } | 288 | } |
289 | } | 289 | } |
290 | 290 | ||
291 | fn parse_macro( | 291 | fn parse_macro_expansion( |
292 | db: &dyn AstDatabase, | 292 | db: &dyn AstDatabase, |
293 | macro_file: MacroFile, | 293 | macro_file: MacroFile, |
294 | ) -> MacroResult<(Parse<SyntaxNode>, Arc<mbe::TokenMap>)> { | 294 | ) -> MacroResult<(Parse<SyntaxNode>, Arc<mbe::TokenMap>)> { |
diff --git a/crates/hir_expand/src/lib.rs b/crates/hir_expand/src/lib.rs index 9fc697d6f..83e09738b 100644 --- a/crates/hir_expand/src/lib.rs +++ b/crates/hir_expand/src/lib.rs | |||
@@ -144,7 +144,7 @@ impl HirFileId { | |||
144 | let def_tt = loc.def.ast_id?.to_node(db).token_tree()?; | 144 | let def_tt = loc.def.ast_id?.to_node(db).token_tree()?; |
145 | 145 | ||
146 | let macro_def = db.macro_def(loc.def)?; | 146 | let macro_def = db.macro_def(loc.def)?; |
147 | let (parse, exp_map) = db.parse_macro(macro_file).value?; | 147 | let (parse, exp_map) = db.parse_macro_expansion(macro_file).value?; |
148 | let macro_arg = db.macro_arg(macro_file.macro_call_id)?; | 148 | let macro_arg = db.macro_arg(macro_file.macro_call_id)?; |
149 | 149 | ||
150 | Some(ExpansionInfo { | 150 | Some(ExpansionInfo { |