File tree Expand file tree Collapse file tree 2 files changed +6
-70
lines changed
compiler/rustc_type_ir/src/search_graph Expand file tree Collapse file tree 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;
1515mod global_cache;
1616use global_cache:: CacheData ;
1717pub use global_cache:: GlobalCache ;
18- mod validate;
1918
2019/// The search graph does not simply use `Interner` directly
2120/// to enable its fuzzing without having to stub the rest of
@@ -362,7 +361,12 @@ impl<D: Delegate<Cx = X>, X: Cx> SearchGraph<D> {
362361 }
363362
364363 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+ }
366370 }
367371
368372 /// 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> {
463467 inspect : & mut D :: ProofTreeBuilder ,
464468 mut evaluate_goal : impl FnMut ( & mut Self , & mut D :: ProofTreeBuilder ) -> X :: Result ,
465469 ) -> X :: Result {
466- self . check_invariants ( ) ;
467- // Check for overflow.
468470 let Some ( available_depth) = AvailableDepth :: allowed_depth_for_nested :: < D > ( cx, & self . stack )
469471 else {
470472 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