Skip to content

Commit 9f4b978

Browse files
committed
Revert "Don't use global caches if opaques can be defined"
This reverts commit 61b5e11.
1 parent ffd978b commit 9f4b978

File tree

1 file changed

+1
-7
lines changed
  • compiler/rustc_trait_selection/src/traits/select

1 file changed

+1
-7
lines changed

compiler/rustc_trait_selection/src/traits/select/mod.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -1487,7 +1487,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
14871487
return false;
14881488
}
14891489

1490-
// Avoid using the global cache during coherence and just rely
1490+
// Avoid using the master cache during coherence and just rely
14911491
// on the local cache. This effectively disables caching
14921492
// during coherence. It is really just a simplification to
14931493
// avoid us having to fear that coherence results "pollute"
@@ -1498,12 +1498,6 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
14981498
return false;
14991499
}
15001500

1501-
// Avoid using the global cache when we're defining opaque types
1502-
// as their hidden type may impact the result of candidate selection.
1503-
if !self.infcx.defining_opaque_types().is_empty() {
1504-
return false;
1505-
}
1506-
15071501
// Otherwise, we can use the global cache.
15081502
true
15091503
}

0 commit comments

Comments
 (0)