mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
fix: Fix nested includes resolving from the wrong base file
This commit is contained in:
parent
d5366b5c19
commit
215ede8497
3 changed files with 54 additions and 2 deletions
|
@ -318,6 +318,7 @@ pub trait MacroFileIdExt {
|
|||
fn expansion_level(self, db: &dyn ExpandDatabase) -> u32;
|
||||
/// If this is a macro call, returns the syntax node of the call.
|
||||
fn call_node(self, db: &dyn ExpandDatabase) -> InFile<SyntaxNode>;
|
||||
fn parent(self, db: &dyn ExpandDatabase) -> HirFileId;
|
||||
|
||||
fn expansion_info(self, db: &dyn ExpandDatabase) -> ExpansionInfo;
|
||||
|
||||
|
@ -353,6 +354,9 @@ impl MacroFileIdExt for MacroFileId {
|
|||
};
|
||||
}
|
||||
}
|
||||
fn parent(self, db: &dyn ExpandDatabase) -> HirFileId {
|
||||
self.macro_call_id.lookup(db).kind.file_id()
|
||||
}
|
||||
|
||||
/// Return expansion information if it is a macro-expansion file
|
||||
fn expansion_info(self, db: &dyn ExpandDatabase) -> ExpansionInfo {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue