Add missing cancellation point

This commit is contained in:
Aleksey Kladov 2020-07-24 13:51:27 +02:00
parent bc0a378070
commit b9ef6cf295

View file

@ -321,6 +321,7 @@ impl<'db> SemanticsImpl<'db> {
let sa = self.analyze2(parent.as_ref(), None); let sa = self.analyze2(parent.as_ref(), None);
let token = successors(Some(parent.with_value(token)), |token| { 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 macro_call = token.value.ancestors().find_map(ast::MacroCall::cast)?;
let tt = macro_call.token_tree()?; let tt = macro_call.token_tree()?;
if !tt.syntax().text_range().contains_range(token.value.text_range()) { if !tt.syntax().text_range().contains_range(token.value.text_range()) {