Remove as_original_file

This commit is contained in:
Shotaro Yamada 2019-10-11 06:53:31 +09:00
parent 04741ae2bc
commit 0d0a444d43

View File

@ -50,16 +50,6 @@ impl HirFileId {
}
}
/// XXX: this is a temporary function, which should go away when we implement the
/// nameresolution+macro expansion combo. Prefer using `original_file` if
/// possible.
pub fn as_original_file(self) -> FileId {
match self.0 {
HirFileIdRepr::File(file_id) => file_id,
HirFileIdRepr::Macro(_r) => panic!("macro generated file: {:?}", self),
}
}
/// Get the crate which the macro lives in, if it is a macro file.
pub(crate) fn macro_crate(self, db: &impl AstDatabase) -> Option<Crate> {
match self.0 {