mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
fix: Fix completions panicking with certain macro setups
This commit is contained in:
parent
5fead606bc
commit
cc7fe32ba3
6 changed files with 19 additions and 6 deletions
|
@ -969,8 +969,10 @@ impl<'db> SemanticsImpl<'db> {
|
|||
match value.parent() {
|
||||
Some(parent) => Some(InFile::new(file_id, parent)),
|
||||
None => {
|
||||
self.cache(value.clone(), file_id);
|
||||
Some(file_id.macro_file()?.call_node(db))
|
||||
let call_node = file_id.macro_file()?.call_node(db);
|
||||
// cache the node
|
||||
self.parse_or_expand(call_node.file_id);
|
||||
Some(call_node)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue