@@ -474,7 +474,7 @@ pub enum SubregionOrigin<'tcx> {
474
474
trait_item_def_id : DefId ,
475
475
} ,
476
476
477
- AscribeUserTypeProvePredicate ( Span ) ,
477
+ AscribeUserTypeProvePredicate ( DefId , Span ) ,
478
478
}
479
479
480
480
// `SubregionOrigin` is used a lot. Make sure it doesn't unintentionally get bigger.
@@ -485,7 +485,9 @@ impl<'tcx> SubregionOrigin<'tcx> {
485
485
pub fn to_constraint_category ( & self ) -> ConstraintCategory < ' tcx > {
486
486
match self {
487
487
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
+ }
489
491
_ => ConstraintCategory :: BoringNoLocation ,
490
492
}
491
493
}
@@ -1862,7 +1864,7 @@ impl<'tcx> SubregionOrigin<'tcx> {
1862
1864
Reborrow ( a) => a,
1863
1865
ReferenceOutlivesReferent ( _, a) => a,
1864
1866
CompareImplItemObligation { span, .. } => span,
1865
- AscribeUserTypeProvePredicate ( span) => span,
1867
+ AscribeUserTypeProvePredicate ( _ , span) => span,
1866
1868
CheckAssociatedTypeBounds { ref parent, .. } => parent. span ( ) ,
1867
1869
}
1868
1870
}
@@ -1895,8 +1897,8 @@ impl<'tcx> SubregionOrigin<'tcx> {
1895
1897
parent : Box :: new ( default ( ) ) ,
1896
1898
} ,
1897
1899
1898
- traits:: ObligationCauseCode :: AscribeUserTypeProvePredicate ( span) => {
1899
- SubregionOrigin :: AscribeUserTypeProvePredicate ( span)
1900
+ traits:: ObligationCauseCode :: AscribeUserTypeProvePredicate ( def_id , span) => {
1901
+ SubregionOrigin :: AscribeUserTypeProvePredicate ( def_id , span)
1900
1902
}
1901
1903
1902
1904
_ => default ( ) ,
0 commit comments