mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-05 19:43:24 +00:00
Remove as_original_file
This commit is contained in:
parent
04741ae2bc
commit
0d0a444d43
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user