mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 15:15:24 +00:00
Change to use Expansion::file_id and reordering
This commit is contained in:
parent
8010b42b21
commit
94c63d2802
2 changed files with 40 additions and 46 deletions
|
@ -140,12 +140,7 @@ impl Expansion {
|
|||
exp_info.map_token_down(token)
|
||||
}
|
||||
|
||||
pub fn source(&self, db: &impl HirDatabase) -> Source<AstId<ast::MacroCall>> {
|
||||
let loc = db.lookup_intern_macro(self.macro_call_id);
|
||||
Source::new(self.file_id(), loc.ast_id)
|
||||
}
|
||||
|
||||
fn file_id(&self) -> HirFileId {
|
||||
pub fn file_id(&self) -> HirFileId {
|
||||
self.macro_call_id.as_file(MacroFileKind::Items)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue