@@ -474,7 +474,7 @@ pub enum SubregionOrigin<'tcx> {
474474 trait_item_def_id : DefId ,
475475 } ,
476476
477- AscribeUserTypeProvePredicate ( Span ) ,
477+ AscribeUserTypeProvePredicate ( DefId , Span ) ,
478478}
479479
480480// `SubregionOrigin` is used a lot. Make sure it doesn't unintentionally get bigger.
@@ -485,7 +485,9 @@ impl<'tcx> SubregionOrigin<'tcx> {
485485 pub fn to_constraint_category ( & self ) -> ConstraintCategory < ' tcx > {
486486 match self {
487487 Self :: Subtype ( type_trace) => type_trace. cause . to_constraint_category ( ) ,
488- Self :: AscribeUserTypeProvePredicate ( span) => ConstraintCategory :: Predicate ( * span) ,
488+ Self :: AscribeUserTypeProvePredicate ( def_id, span) => {
489+ ConstraintCategory :: Predicate ( * def_id, * span)
490+ }
489491 _ => ConstraintCategory :: BoringNoLocation ,
490492 }
491493 }
@@ -1862,7 +1864,7 @@ impl<'tcx> SubregionOrigin<'tcx> {
18621864 Reborrow ( a) => a,
18631865 ReferenceOutlivesReferent ( _, a) => a,
18641866 CompareImplItemObligation { span, .. } => span,
1865- AscribeUserTypeProvePredicate ( span) => span,
1867+ AscribeUserTypeProvePredicate ( _ , span) => span,
18661868 CheckAssociatedTypeBounds { ref parent, .. } => parent. span ( ) ,
18671869 }
18681870 }
@@ -1895,8 +1897,8 @@ impl<'tcx> SubregionOrigin<'tcx> {
18951897 parent : Box :: new ( default ( ) ) ,
18961898 } ,
18971899
1898- traits:: ObligationCauseCode :: AscribeUserTypeProvePredicate ( span) => {
1899- SubregionOrigin :: AscribeUserTypeProvePredicate ( span)
1900+ traits:: ObligationCauseCode :: AscribeUserTypeProvePredicate ( def_id , span) => {
1901+ SubregionOrigin :: AscribeUserTypeProvePredicate ( def_id , span)
19001902 }
19011903
19021904 _ => default ( ) ,
0 commit comments