diff options
author | Aleksey Kladov <[email protected]> | 2019-06-12 16:05:02 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-06-12 16:47:55 +0100 |
commit | b8cae2cf8f7d2a0162d614e25ef95d7e4a5d3677 (patch) | |
tree | 464e2eaab5133f137e9d5c36fb34f6f6876c0432 /crates/ra_hir/src/ids.rs | |
parent | c452d2842c2ac7156178a05fe477e8832253a2c4 (diff) |
check for cancellation when executing queries
Note that we can't just remove CheckCanceled trait altogether:
sometimes it's useful to check for cancellation while the query is
running! We do this, for example, in the name resolution fixed-point
loop.
Diffstat (limited to 'crates/ra_hir/src/ids.rs')
-rw-r--r-- | crates/ra_hir/src/ids.rs | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/crates/ra_hir/src/ids.rs b/crates/ra_hir/src/ids.rs index 352f9ffd9..033af1632 100644 --- a/crates/ra_hir/src/ids.rs +++ b/crates/ra_hir/src/ids.rs | |||
@@ -61,7 +61,6 @@ impl HirFileId { | |||
61 | db: &impl AstDatabase, | 61 | db: &impl AstDatabase, |
62 | file_id: HirFileId, | 62 | file_id: HirFileId, |
63 | ) -> Option<TreeArc<SyntaxNode>> { | 63 | ) -> Option<TreeArc<SyntaxNode>> { |
64 | db.check_canceled(); | ||
65 | match file_id.0 { | 64 | match file_id.0 { |
66 | HirFileIdRepr::File(file_id) => Some(db.parse(file_id).tree.syntax().to_owned()), | 65 | HirFileIdRepr::File(file_id) => Some(db.parse(file_id).tree.syntax().to_owned()), |
67 | HirFileIdRepr::Macro(macro_file) => db.parse_macro(macro_file), | 66 | HirFileIdRepr::Macro(macro_file) => db.parse_macro(macro_file), |