Trait hir::HirFileIdExt
pub trait HirFileIdExt {
// Required methods
fn edition(self, db: &dyn ExpandDatabase) -> Edition;
fn original_file(self, db: &dyn ExpandDatabase) -> EditionedFileId;
fn original_file_respecting_includes(
self,
db: &dyn ExpandDatabase,
) -> EditionedFileId;
fn original_call_node(
self,
db: &dyn ExpandDatabase,
) -> Option<InFileWrapper<EditionedFileId, SyntaxNode<RustLanguage>>>;
fn as_builtin_derive_attr_node(
&self,
db: &dyn ExpandDatabase,
) -> Option<InFileWrapper<HirFileId, Attr>>;
}
Required Methods§
fn edition(self, db: &dyn ExpandDatabase) -> Edition
fn original_file(self, db: &dyn ExpandDatabase) -> EditionedFileId
fn original_file(self, db: &dyn ExpandDatabase) -> EditionedFileId
Returns the original file of this macro call hierarchy.
fn original_file_respecting_includes(
self,
db: &dyn ExpandDatabase,
) -> EditionedFileId
fn original_file_respecting_includes( self, db: &dyn ExpandDatabase, ) -> EditionedFileId
Returns the original file of this macro call hierarchy while going into the included file if one of the calls comes from an `include!``.
fn original_call_node(
self,
db: &dyn ExpandDatabase,
) -> Option<InFileWrapper<EditionedFileId, SyntaxNode<RustLanguage>>>
fn original_call_node( self, db: &dyn ExpandDatabase, ) -> Option<InFileWrapper<EditionedFileId, SyntaxNode<RustLanguage>>>
If this is a macro call, returns the syntax node of the very first macro call this file resides in.