File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed
rustc_borrowck/src/type_check
rustc_infer/src/infer/region_constraints
rustc_trait_selection/src/traits Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,12 @@ pub(crate) fn type_check<'a, 'tcx>(
140140 & mut constraints,
141141 ) ;
142142
143+ let pre_obligations = infcx. take_registered_region_obligations ( ) ;
144+ assert ! (
145+ pre_obligations. is_empty( ) ,
146+ "there should be no incoming region obligations = {pre_obligations:#?}" ,
147+ ) ;
148+
143149 debug ! ( ?normalized_inputs_and_output) ;
144150
145151 let mut typeck = TypeChecker {
Original file line number Diff line number Diff line change @@ -299,10 +299,6 @@ impl<'tcx> RegionConstraintCollector<'_, 'tcx> {
299299 self . storage . var_infos . len ( )
300300 }
301301
302- pub fn region_constraint_data ( & self ) -> & RegionConstraintData < ' tcx > {
303- & self . storage . data
304- }
305-
306302 /// Takes (and clears) the current set of constraints. Note that
307303 /// the set of variables remains intact, but all relationships
308304 /// between them are reset. This is used during NLL checking to
Original file line number Diff line number Diff line change @@ -161,8 +161,7 @@ impl<'tcx> AutoTraitFinder<'tcx> {
161161 let outlives_env = OutlivesEnvironment :: new ( full_env) ;
162162 let _ = infcx. process_registered_region_obligations ( & outlives_env, |ty, _| Ok ( ty) ) ;
163163
164- let region_data =
165- infcx. inner . borrow_mut ( ) . unwrap_region_constraints ( ) . region_constraint_data ( ) . clone ( ) ;
164+ let region_data = infcx. inner . borrow_mut ( ) . unwrap_region_constraints ( ) . data ( ) . clone ( ) ;
166165
167166 let vid_to_region = self . map_vid_to_region ( & region_data) ;
168167
You can’t perform that action at this time.
0 commit comments