File tree 2 files changed +0
-12
lines changed
rustc_trait_selection/src/traits
2 files changed +0
-12
lines changed Original file line number Diff line number Diff line change @@ -1521,15 +1521,6 @@ impl<'tcx> InferCtxt<'tcx> {
1521
1521
closure_kind_ty. to_opt_closure_kind ( )
1522
1522
}
1523
1523
1524
- /// Clears the selection, evaluation, and projection caches. This is useful when
1525
- /// repeatedly attempting to select an `Obligation` while changing only
1526
- /// its `ParamEnv`, since `FulfillmentContext` doesn't use probing.
1527
- pub fn clear_caches ( & self ) {
1528
- self . selection_cache . clear ( ) ;
1529
- self . evaluation_cache . clear ( ) ;
1530
- self . inner . borrow_mut ( ) . projection_cache ( ) . clear ( ) ;
1531
- }
1532
-
1533
1524
pub fn universe ( & self ) -> ty:: UniverseIndex {
1534
1525
self . universe . get ( )
1535
1526
}
Original file line number Diff line number Diff line change @@ -152,7 +152,6 @@ impl<'tcx> AutoTraitFinder<'tcx> {
152
152
with {:?}",
153
153
trait_ref, full_env
154
154
) ;
155
- infcx. clear_caches ( ) ;
156
155
157
156
// At this point, we already have all of the bounds we need. FulfillmentContext is used
158
157
// to store all of the necessary region/lifetime bounds in the InferContext, as well as
@@ -255,8 +254,6 @@ impl<'tcx> AutoTraitFinder<'tcx> {
255
254
let dummy_cause = ObligationCause :: dummy ( ) ;
256
255
257
256
while let Some ( pred) = predicates. pop_front ( ) {
258
- infcx. clear_caches ( ) ;
259
-
260
257
if !already_visited. insert ( pred) {
261
258
continue ;
262
259
}
You can’t perform that action at this time.
0 commit comments