Use FileAstId<ast::Adt> in nameres where appropriate instead

This commit is contained in:
Lukas Wirth 2022-01-07 14:19:11 +01:00
parent 08adce61a1
commit ca4baa6e55
23 changed files with 98 additions and 65 deletions

View file

@ -649,8 +649,12 @@ impl Module {
let node = ast_id.to_node(db.upcast());
ast_id.with_value(SyntaxNodePtr::from(AstPtr::new(&node)))
}
MacroCallKind::Derive { ast_id, .. }
| MacroCallKind::Attr { ast_id, .. } => {
MacroCallKind::Derive { ast_id, .. } => {
// FIXME: point to the attribute instead, this creates very large diagnostics
let node = ast_id.to_node(db.upcast());
ast_id.with_value(SyntaxNodePtr::from(AstPtr::new(&node)))
}
MacroCallKind::Attr { ast_id, .. } => {
// FIXME: point to the attribute instead, this creates very large diagnostics
let node = ast_id.to_node(db.upcast());
ast_id.with_value(SyntaxNodePtr::from(AstPtr::new(&node)))