diff options
author | Aleksey Kladov <[email protected]> | 2020-07-15 14:49:20 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-07-15 14:49:20 +0100 |
commit | 8baa2b727ddca404e65560de61ac2fb5e1224a5b (patch) | |
tree | 65dd859107e000917d7fe3a02871ee24e920ac8b /crates/ra_hir_def/src | |
parent | 760ee8173c59976ca111040bc017b57df105768d (diff) |
Check cancellation when updating imports recursively
For winapi, this takes a lot of CPU time without doing queries and
causes the main event loop to stall on cancellation.
Diffstat (limited to 'crates/ra_hir_def/src')
-rw-r--r-- | crates/ra_hir_def/src/nameres/collector.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/ra_hir_def/src/nameres/collector.rs b/crates/ra_hir_def/src/nameres/collector.rs index 99ac730ba..6494b653a 100644 --- a/crates/ra_hir_def/src/nameres/collector.rs +++ b/crates/ra_hir_def/src/nameres/collector.rs | |||
@@ -573,6 +573,7 @@ impl DefCollector<'_> { | |||
573 | vis: Visibility, | 573 | vis: Visibility, |
574 | import_type: ImportType, | 574 | import_type: ImportType, |
575 | ) { | 575 | ) { |
576 | self.db.check_canceled(); | ||
576 | self.update_recursive(module_id, resolutions, vis, import_type, 0) | 577 | self.update_recursive(module_id, resolutions, vis, import_type, 0) |
577 | } | 578 | } |
578 | 579 | ||