mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-25 11:17:13 +00:00
fix SCIP panicking due to salsa not attaching
This commit is contained in:
parent
905641f352
commit
01b2eff275
@ -278,7 +278,7 @@ impl StaticIndex<'_> {
|
||||
for token in tokens {
|
||||
let range = token.text_range();
|
||||
let node = token.parent().unwrap();
|
||||
match get_definitions(&sema, token.clone()) {
|
||||
match salsa::attach(self.db, || get_definitions(&sema, token.clone())) {
|
||||
Some(it) => {
|
||||
for i in it {
|
||||
add_token(i, range, &node);
|
||||
|
Loading…
x
Reference in New Issue
Block a user