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<InRealFile<SyntaxNode>>;
fn as_builtin_derive_attr_node(
&self,
db: &dyn ExpandDatabase,
) -> Option<InFile<Attr>>;
}
Required Methods§
fn edition(self, db: &dyn ExpandDatabase) -> Edition
sourcefn original_file(self, db: &dyn ExpandDatabase) -> EditionedFileId
fn original_file(self, db: &dyn ExpandDatabase) -> EditionedFileId
Returns the original file of this macro call hierarchy.
sourcefn 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!``.
sourcefn original_call_node(
self,
db: &dyn ExpandDatabase,
) -> Option<InRealFile<SyntaxNode>>
fn original_call_node( self, db: &dyn ExpandDatabase, ) -> Option<InRealFile<SyntaxNode>>
If this is a macro call, returns the syntax node of the very first macro call this file resides in.