mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
internal: refactor unimplemented builtin macro diagnostic
This commit is contained in:
parent
dec207f56a
commit
d3621eeb02
4 changed files with 33 additions and 31 deletions
|
@ -606,8 +606,12 @@ impl Module {
|
|||
let node = ast.to_node(db.upcast());
|
||||
// Must have a name, otherwise we wouldn't emit it.
|
||||
let name = node.name().expect("unimplemented builtin macro with no name");
|
||||
let ptr = SyntaxNodePtr::from(AstPtr::new(&name));
|
||||
sink.push(UnimplementedBuiltinMacro { file: ast.file_id, node: ptr });
|
||||
acc.push(
|
||||
UnimplementedBuiltinMacro {
|
||||
node: ast.with_value(SyntaxNodePtr::from(AstPtr::new(&name))),
|
||||
}
|
||||
.into(),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue