Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir/src/lib.rs')
| -rw-r--r-- | crates/hir/src/lib.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index ee423573d5..c6d401a6d6 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs @@ -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))) |