mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
nicer behavior in case of bugs
We should always reach a fixed point, but if we fail, let's fail loudly!
This commit is contained in:
parent
e53eab3f25
commit
54f30bb6d8
@ -190,7 +190,12 @@ where
|
|||||||
self.populate_module(module_id, Arc::clone(items));
|
self.populate_module(module_id, Arc::clone(items));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let mut iter = 0;
|
||||||
loop {
|
loop {
|
||||||
|
iter += 1;
|
||||||
|
if iter > 1000 {
|
||||||
|
panic!("failed to reach fixedpoint after 1000 iters")
|
||||||
|
}
|
||||||
let processed_imports_count = self.processed_imports.len();
|
let processed_imports_count = self.processed_imports.len();
|
||||||
for &module_id in self.input.keys() {
|
for &module_id in self.input.keys() {
|
||||||
self.db.check_canceled();
|
self.db.check_canceled();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user