aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShotaro Yamada <[email protected]>2019-10-10 22:53:31 +0100
committerShotaro Yamada <[email protected]>2019-10-10 22:53:43 +0100
commit0d0a444d4380d9d1eb580d862b2376b9693d77f3 (patch)
treec51b9acd97d0f3a336a8473b743e468cd570224c
parent04741ae2bc70bc002f62b9b142057dd6eabcec75 (diff)
Remove `as_original_file`
-rw-r--r--crates/ra_hir/src/ids.rs10
1 files changed, 0 insertions, 10 deletions
diff --git a/crates/ra_hir/src/ids.rs b/crates/ra_hir/src/ids.rs
index a3b65cc79..85b022744 100644
--- a/crates/ra_hir/src/ids.rs
+++ b/crates/ra_hir/src/ids.rs
@@ -50,16 +50,6 @@ impl HirFileId {
50 } 50 }
51 } 51 }
52 52
53 /// XXX: this is a temporary function, which should go away when we implement the
54 /// nameresolution+macro expansion combo. Prefer using `original_file` if
55 /// possible.
56 pub fn as_original_file(self) -> FileId {
57 match self.0 {
58 HirFileIdRepr::File(file_id) => file_id,
59 HirFileIdRepr::Macro(_r) => panic!("macro generated file: {:?}", self),
60 }
61 }
62
63 /// Get the crate which the macro lives in, if it is a macro file. 53 /// Get the crate which the macro lives in, if it is a macro file.
64 pub(crate) fn macro_crate(self, db: &impl AstDatabase) -> Option<Crate> { 54 pub(crate) fn macro_crate(self, db: &impl AstDatabase) -> Option<Crate> {
65 match self.0 { 55 match self.0 {