Skip to content

Commit

Permalink
DONE? DONE!
Browse files Browse the repository at this point in the history
  • Loading branch information
lcnr committed Aug 9, 2024
1 parent 2de329c commit ad501b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 70 deletions.
10 changes: 6 additions & 4 deletions compiler/rustc_type_ir/src/search_graph/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ use crate::solve::SolverMode;
mod global_cache;
use global_cache::CacheData;
pub use global_cache::GlobalCache;
mod validate;

/// The search graph does not simply use `Interner` directly
/// to enable its fuzzing without having to stub the rest of
Expand Down Expand Up @@ -362,7 +361,12 @@ impl<D: Delegate<Cx = X>, X: Cx> SearchGraph<D> {
}

pub fn is_empty(&self) -> bool {
self.stack.is_empty()
if self.stack.is_empty() {
debug_assert!(self.provisional_cache.is_empty());
true
} else {
false
}
}

/// The number of goals currently in the search graph. This should only be
Expand Down Expand Up @@ -463,8 +467,6 @@ impl<D: Delegate<Cx = X>, X: Cx> SearchGraph<D> {
inspect: &mut D::ProofTreeBuilder,
mut evaluate_goal: impl FnMut(&mut Self, &mut D::ProofTreeBuilder) -> X::Result,
) -> X::Result {
self.check_invariants();
// Check for overflow.
let Some(available_depth) = AvailableDepth::allowed_depth_for_nested::<D>(cx, &self.stack)
else {
return self.handle_overflow(cx, input, inspect);
Expand Down
66 changes: 0 additions & 66 deletions compiler/rustc_type_ir/src/search_graph/validate.rs

This file was deleted.

0 comments on commit ad501b4

Please sign in to comment.