@@ -164,7 +164,7 @@ impl<'cx, 'tcx> InferCtxt<'cx, 'tcx> {
164164
165165 let outlives =
166166 & mut TypeOutlives :: new ( self , self . tcx , & region_bound_pairs, None , param_env) ;
167- let category = ConstraintCategory :: BoringNoLocation ;
167+ let category = origin . to_constraint_category ( ) ;
168168 outlives. type_must_outlive ( origin, sup_type, sub_region, category) ;
169169 }
170170 }
@@ -394,7 +394,7 @@ where
394394 if approx_env_bounds. is_empty ( ) && trait_bounds. is_empty ( ) && needs_infer {
395395 debug ! ( "projection_must_outlive: no declared bounds" ) ;
396396
397- let constraint = ConstraintCategory :: BoringNoLocation ;
397+ let constraint = origin . to_constraint_category ( ) ;
398398 for k in projection_ty. substs {
399399 match k. unpack ( ) {
400400 GenericArgKind :: Lifetime ( lt) => {
@@ -444,7 +444,7 @@ where
444444 let unique_bound = trait_bounds[ 0 ] ;
445445 debug ! ( "projection_must_outlive: unique trait bound = {:?}" , unique_bound) ;
446446 debug ! ( "projection_must_outlive: unique declared bound appears in trait ref" ) ;
447- let category = ConstraintCategory :: BoringNoLocation ;
447+ let category = origin . to_constraint_category ( ) ;
448448 self . delegate . push_sub_region_constraint ( origin, region, unique_bound, category) ;
449449 return ;
450450 }
0 commit comments