aboutsummaryrefslogtreecommitdiff
path: root/crates/hir/src/lib.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-06-13 17:35:30 +0100
committerAleksey Kladov <[email protected]>2021-06-13 17:35:30 +0100
commitd3621eeb02652038a8185f60d78fb4791a732dc6 (patch)
tree0e200e563949977ffd0a857555d4ff874ab758dd /crates/hir/src/lib.rs
parentdec207f56a7b16075f68dcb89138d93a7eecdf43 (diff)
internal: refactor unimplemented builtin macro diagnostic
Diffstat (limited to 'crates/hir/src/lib.rs')
-rw-r--r--crates/hir/src/lib.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index d891d0ec1..a361158e0 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -606,8 +606,12 @@ impl Module {
606 let node = ast.to_node(db.upcast()); 606 let node = ast.to_node(db.upcast());
607 // Must have a name, otherwise we wouldn't emit it. 607 // Must have a name, otherwise we wouldn't emit it.
608 let name = node.name().expect("unimplemented builtin macro with no name"); 608 let name = node.name().expect("unimplemented builtin macro with no name");
609 let ptr = SyntaxNodePtr::from(AstPtr::new(&name)); 609 acc.push(
610 sink.push(UnimplementedBuiltinMacro { file: ast.file_id, node: ptr }); 610 UnimplementedBuiltinMacro {
611 node: ast.with_value(SyntaxNodePtr::from(AstPtr::new(&name))),
612 }
613 .into(),
614 );
611 } 615 }
612 } 616 }
613 } 617 }