Store crate info in MacroDefId

This commit is contained in:
uHOOCCOOHu 2019-09-27 00:16:55 +08:00
parent 128dc5355b
commit 8cd23a4fb8
No known key found for this signature in database
GPG key ID: CED392DE0C483D00
3 changed files with 11 additions and 5 deletions

View file

@ -119,7 +119,7 @@ impl HasSource for TypeAlias {
impl HasSource for MacroDef {
type Ast = ast::MacroCall;
fn source(self, db: &(impl DefDatabase + AstDatabase)) -> Source<ast::MacroCall> {
Source { file_id: self.id.0.file_id(), ast: self.id.0.to_node(db) }
Source { file_id: self.id.ast_id.file_id(), ast: self.id.ast_id.to_node(db) }
}
}