check cancellation when expanding macros

This commit is contained in:
Aleksey Kladov 2019-05-27 14:41:14 +03:00
parent 0d2f97e83e
commit a2845bb1f5
2 changed files with 3 additions and 3 deletions

View file

@ -61,6 +61,7 @@ impl HirFileId {
db: &impl DefDatabase,
file_id: HirFileId,
) -> Option<TreeArc<SyntaxNode>> {
db.check_canceled();
let _p = profile("parse_or_expand_query");
match file_id.0 {
HirFileIdRepr::File(file_id) => Some(db.parse(file_id).syntax().to_owned()),