Skip to content

Commit

Permalink
disable global caching during coherence
Browse files Browse the repository at this point in the history
  • Loading branch information
lcnr committed Mar 21, 2023
1 parent 938434a commit a7ec045
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/rustc_trait_selection/src/solve/search_graph/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ impl<'tcx> SearchGraph<'tcx> {
// dependencies, our non-root goal may no longer appear as child of the root goal.
//
// See https://github.com/rust-lang/rust/pull/108071 for some additional context.
let should_cache_globally = !self.overflow_data.did_overflow() || self.stack.is_empty();
let should_cache_globally = matches!(self.solver_mode(), SolverMode::Normal)
&& (!self.overflow_data.did_overflow() || self.stack.is_empty());
if should_cache_globally {
tcx.new_solver_evaluation_cache.insert(
current_goal.goal,
Expand Down

0 comments on commit a7ec045

Please sign in to comment.