Skip to content

Commit a7ec045

Browse files
committed
disable global caching during coherence
1 parent 938434a commit a7ec045

File tree

1 file changed

+2
-1
lines changed
  • compiler/rustc_trait_selection/src/solve/search_graph

1 file changed

+2
-1
lines changed

compiler/rustc_trait_selection/src/solve/search_graph/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@ impl<'tcx> SearchGraph<'tcx> {
254254
// dependencies, our non-root goal may no longer appear as child of the root goal.
255255
//
256256
// See https://github.com/rust-lang/rust/pull/108071 for some additional context.
257-
let should_cache_globally = !self.overflow_data.did_overflow() || self.stack.is_empty();
257+
let should_cache_globally = matches!(self.solver_mode(), SolverMode::Normal)
258+
&& (!self.overflow_data.did_overflow() || self.stack.is_empty());
258259
if should_cache_globally {
259260
tcx.new_solver_evaluation_cache.insert(
260261
current_goal.goal,

0 commit comments

Comments
 (0)