File tree 2 files changed +6
-70
lines changed
compiler/rustc_type_ir/src/search_graph
2 files changed +6
-70
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ use crate::solve::SolverMode;
15
15
mod global_cache;
16
16
use global_cache:: CacheData ;
17
17
pub use global_cache:: GlobalCache ;
18
- mod validate;
19
18
20
19
/// The search graph does not simply use `Interner` directly
21
20
/// to enable its fuzzing without having to stub the rest of
@@ -362,7 +361,12 @@ impl<D: Delegate<Cx = X>, X: Cx> SearchGraph<D> {
362
361
}
363
362
364
363
pub fn is_empty ( & self ) -> bool {
365
- self . stack . is_empty ( )
364
+ if self . stack . is_empty ( ) {
365
+ debug_assert ! ( self . provisional_cache. is_empty( ) ) ;
366
+ true
367
+ } else {
368
+ false
369
+ }
366
370
}
367
371
368
372
/// The number of goals currently in the search graph. This should only be
@@ -463,8 +467,6 @@ impl<D: Delegate<Cx = X>, X: Cx> SearchGraph<D> {
463
467
inspect : & mut D :: ProofTreeBuilder ,
464
468
mut evaluate_goal : impl FnMut ( & mut Self , & mut D :: ProofTreeBuilder ) -> X :: Result ,
465
469
) -> X :: Result {
466
- self . check_invariants ( ) ;
467
- // Check for overflow.
468
470
let Some ( available_depth) = AvailableDepth :: allowed_depth_for_nested :: < D > ( cx, & self . stack )
469
471
else {
470
472
return self . handle_overflow ( cx, input, inspect) ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments