aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ids.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/ids.rs')
-rw-r--r--crates/ra_hir/src/ids.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/ra_hir/src/ids.rs b/crates/ra_hir/src/ids.rs
index 8d81d5ebf..3e11dd6ad 100644
--- a/crates/ra_hir/src/ids.rs
+++ b/crates/ra_hir/src/ids.rs
@@ -74,7 +74,10 @@ impl HirFileId {
74 } 74 }
75 } 75 }
76 76
77 pub(crate) fn as_original_file(self) -> FileId { 77 /// XXX: this is a temporary function, which should go away when we implement the
78 /// nameresolution+macro expansion combo. Prefer using `original_file` if
79 /// possible.
80 pub fn as_original_file(self) -> FileId {
78 match self.0 { 81 match self.0 {
79 HirFileIdRepr::File(file_id) => file_id, 82 HirFileIdRepr::File(file_id) => file_id,
80 HirFileIdRepr::Macro(_r) => panic!("macro generated file: {:?}", self), 83 HirFileIdRepr::Macro(_r) => panic!("macro generated file: {:?}", self),