diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-18 13:09:29 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-18 13:09:29 +0000 |
commit | 9cc4d058d2b0a8741ef67b71986b4c51b4459426 (patch) | |
tree | c4eb2e0d8dce47d503d1ed063a6b3e0fadba1c1f /crates/ra_hir_expand/src/db.rs | |
parent | 789a0d2a6474f924a0c3239a085b5e8579b1e7f6 (diff) | |
parent | 2b6f1ab0e2303dce8e6e424514fd2a9e74566c89 (diff) |
Merge #2302
2302: Collapse TokenMap and RevTokenMap r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir_expand/src/db.rs')
-rw-r--r-- | crates/ra_hir_expand/src/db.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/crates/ra_hir_expand/src/db.rs b/crates/ra_hir_expand/src/db.rs index 9de7c1ea8..3c11c8a22 100644 --- a/crates/ra_hir_expand/src/db.rs +++ b/crates/ra_hir_expand/src/db.rs | |||
@@ -59,10 +59,8 @@ pub trait AstDatabase: SourceDatabase { | |||
59 | fn intern_macro(&self, macro_call: MacroCallLoc) -> MacroCallId; | 59 | fn intern_macro(&self, macro_call: MacroCallLoc) -> MacroCallId; |
60 | fn macro_arg(&self, id: MacroCallId) -> Option<Arc<(tt::Subtree, mbe::TokenMap)>>; | 60 | fn macro_arg(&self, id: MacroCallId) -> Option<Arc<(tt::Subtree, mbe::TokenMap)>>; |
61 | fn macro_def(&self, id: MacroDefId) -> Option<Arc<(TokenExpander, mbe::TokenMap)>>; | 61 | fn macro_def(&self, id: MacroDefId) -> Option<Arc<(TokenExpander, mbe::TokenMap)>>; |
62 | fn parse_macro( | 62 | fn parse_macro(&self, macro_file: MacroFile) |
63 | &self, | 63 | -> Option<(Parse<SyntaxNode>, Arc<mbe::TokenMap>)>; |
64 | macro_file: MacroFile, | ||
65 | ) -> Option<(Parse<SyntaxNode>, Arc<mbe::RevTokenMap>)>; | ||
66 | fn macro_expand(&self, macro_call: MacroCallId) -> Result<Arc<tt::Subtree>, String>; | 64 | fn macro_expand(&self, macro_call: MacroCallId) -> Result<Arc<tt::Subtree>, String>; |
67 | } | 65 | } |
68 | 66 | ||
@@ -136,7 +134,7 @@ pub(crate) fn parse_or_expand(db: &dyn AstDatabase, file_id: HirFileId) -> Optio | |||
136 | pub(crate) fn parse_macro( | 134 | pub(crate) fn parse_macro( |
137 | db: &dyn AstDatabase, | 135 | db: &dyn AstDatabase, |
138 | macro_file: MacroFile, | 136 | macro_file: MacroFile, |
139 | ) -> Option<(Parse<SyntaxNode>, Arc<mbe::RevTokenMap>)> { | 137 | ) -> Option<(Parse<SyntaxNode>, Arc<mbe::TokenMap>)> { |
140 | let _p = profile("parse_macro_query"); | 138 | let _p = profile("parse_macro_query"); |
141 | 139 | ||
142 | let macro_call_id = macro_file.macro_call_id; | 140 | let macro_call_id = macro_file.macro_call_id; |