Skip to content

Commit ad501b4

Browse files
committed
DONE? DONE!
1 parent 2de329c commit ad501b4

File tree

2 files changed

+6
-70
lines changed

2 files changed

+6
-70
lines changed

compiler/rustc_type_ir/src/search_graph/mod.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ use crate::solve::SolverMode;
1515
mod global_cache;
1616
use global_cache::CacheData;
1717
pub 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);

compiler/rustc_type_ir/src/search_graph/validate.rs

-66
This file was deleted.

0 commit comments

Comments
 (0)