File tree Expand file tree Collapse file tree 2 files changed +0
-12
lines changed
rustc_trait_selection/src/traits Expand file tree Collapse file tree 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> {
15211521 closure_kind_ty. to_opt_closure_kind ( )
15221522 }
15231523
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-
15331524 pub fn universe ( & self ) -> ty:: UniverseIndex {
15341525 self . universe . get ( )
15351526 }
Original file line number Diff line number Diff line change @@ -152,7 +152,6 @@ impl<'tcx> AutoTraitFinder<'tcx> {
152152 with {:?}",
153153 trait_ref, full_env
154154 ) ;
155- infcx. clear_caches ( ) ;
156155
157156 // At this point, we already have all of the bounds we need. FulfillmentContext is used
158157 // to store all of the necessary region/lifetime bounds in the InferContext, as well as
@@ -255,8 +254,6 @@ impl<'tcx> AutoTraitFinder<'tcx> {
255254 let dummy_cause = ObligationCause :: dummy ( ) ;
256255
257256 while let Some ( pred) = predicates. pop_front ( ) {
258- infcx. clear_caches ( ) ;
259-
260257 if !already_visited. insert ( pred) {
261258 continue ;
262259 }
You can’t perform that action at this time.
0 commit comments