aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-01-25 20:20:11 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-01-25 20:20:11 +0000
commitd3b5ff8fe679b4e66e8af71db063b01d34fec3fc (patch)
treebd6a8cdc2ffdd4b01adc1e2f3bf3b925cb26eea6 /crates/ra_hir/src
parent03fc615ead78ecf126632220104fa4de3414eb7f (diff)
parent54f30bb6d89165397e6c556bff43fcd81d939818 (diff)
Merge #654
654: nicer behavior in case of bugs r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r--crates/ra_hir/src/nameres.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/ra_hir/src/nameres.rs b/crates/ra_hir/src/nameres.rs
index 028c1882f..5193900e0 100644
--- a/crates/ra_hir/src/nameres.rs
+++ b/crates/ra_hir/src/nameres.rs
@@ -190,7 +190,12 @@ where
190 self.populate_module(module_id, Arc::clone(items)); 190 self.populate_module(module_id, Arc::clone(items));
191 } 191 }
192 192
193 let mut iter = 0;
193 loop { 194 loop {
195 iter += 1;
196 if iter > 1000 {
197 panic!("failed to reach fixedpoint after 1000 iters")
198 }
194 let processed_imports_count = self.processed_imports.len(); 199 let processed_imports_count = self.processed_imports.len();
195 for &module_id in self.input.keys() { 200 for &module_id in self.input.keys() {
196 self.db.check_canceled(); 201 self.db.check_canceled();