mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-25 20:43:21 +00:00
Merge #5517
5517: Add missing cancellation point r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
5febf27110
1 changed files with 1 additions and 0 deletions
|
@ -321,6 +321,7 @@ impl<'db> SemanticsImpl<'db> {
|
|||
let sa = self.analyze2(parent.as_ref(), None);
|
||||
|
||||
let token = successors(Some(parent.with_value(token)), |token| {
|
||||
self.db.check_canceled();
|
||||
let macro_call = token.value.ancestors().find_map(ast::MacroCall::cast)?;
|
||||
let tt = macro_call.token_tree()?;
|
||||
if !tt.syntax().text_range().contains_range(token.value.text_range()) {
|
||||
|
|
Loading…
Reference in a new issue