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:
bors[bot] 2020-07-24 11:52:25 +00:00 committed by GitHub
commit 5febf27110
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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()) {