mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Make MacroDefId's AstId
mandatory when possible
This commit is contained in:
parent
816bc73895
commit
b84efbaacf
13 changed files with 58 additions and 55 deletions
|
@ -113,7 +113,7 @@ impl HasSource for TypeAlias {
|
|||
impl HasSource for MacroDef {
|
||||
type Ast = ast::Macro;
|
||||
fn source(self, db: &dyn HirDatabase) -> Option<InFile<Self::Ast>> {
|
||||
let ast_id = self.id.ast_id?;
|
||||
let ast_id = self.id.ast_id()?;
|
||||
Some(InFile { file_id: ast_id.file_id, value: ast_id.to_node(db.upcast()) })
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue