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
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>(
140
140
& mut constraints,
141
141
) ;
142
142
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
+
143
149
debug ! ( ?normalized_inputs_and_output) ;
144
150
145
151
let mut typeck = TypeChecker {
Original file line number Diff line number Diff line change @@ -299,10 +299,6 @@ impl<'tcx> RegionConstraintCollector<'_, 'tcx> {
299
299
self . storage . var_infos . len ( )
300
300
}
301
301
302
- pub fn region_constraint_data ( & self ) -> & RegionConstraintData < ' tcx > {
303
- & self . storage . data
304
- }
305
-
306
302
/// Takes (and clears) the current set of constraints. Note that
307
303
/// the set of variables remains intact, but all relationships
308
304
/// 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> {
161
161
let outlives_env = OutlivesEnvironment :: new ( full_env) ;
162
162
let _ = infcx. process_registered_region_obligations ( & outlives_env, |ty, _| Ok ( ty) ) ;
163
163
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 ( ) ;
166
165
167
166
let vid_to_region = self . map_vid_to_region ( & region_data) ;
168
167
You can’t perform that action at this time.
0 commit comments