aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
diff options
context:
space:
mode:
authorEdwin Cheng <[email protected]>2019-11-19 14:56:28 +0000
committerEdwin Cheng <[email protected]>2019-11-19 14:56:28 +0000
commit94c63d280246971983cad4fa6ce2d333e3ba9f02 (patch)
treeaf2c90f5243f91f4526da10b21ef1212da041663 /crates/ra_hir/src
parent8010b42b21a59e4bb1e025155b8133ae52d3cf45 (diff)
Change to use Expansion::file_id and reordering
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r--crates/ra_hir/src/source_binder.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs
index 6d75296a5..5d3196c2a 100644
--- a/crates/ra_hir/src/source_binder.rs
+++ b/crates/ra_hir/src/source_binder.rs
@@ -140,12 +140,7 @@ impl Expansion {
140 exp_info.map_token_down(token) 140 exp_info.map_token_down(token)
141 } 141 }
142 142
143 pub fn source(&self, db: &impl HirDatabase) -> Source<AstId<ast::MacroCall>> { 143 pub fn file_id(&self) -> HirFileId {
144 let loc = db.lookup_intern_macro(self.macro_call_id);
145 Source::new(self.file_id(), loc.ast_id)
146 }
147
148 fn file_id(&self) -> HirFileId {
149 self.macro_call_id.as_file(MacroFileKind::Items) 144 self.macro_call_id.as_file(MacroFileKind::Items)
150 } 145 }
151} 146}