@@ -409,14 +409,20 @@ pub enum SubregionOrigin<'tcx> {
409409
410410 /// Comparing the signature and requirements of an impl method against
411411 /// the containing trait.
412- CompareImplItemObligation { span : Span , impl_item_def_id : LocalDefId , trait_item_def_id : DefId } ,
412+ CompareImplItemObligation {
413+ span : Span ,
414+ impl_item_def_id : LocalDefId ,
415+ trait_item_def_id : DefId ,
416+ } ,
413417
414418 /// Checking that the bounds of a trait's associated type hold for a given impl
415419 CheckAssociatedTypeBounds {
416420 parent : Box < SubregionOrigin < ' tcx > > ,
417421 impl_item_def_id : LocalDefId ,
418422 trait_item_def_id : DefId ,
419423 } ,
424+
425+ AscribeUserTypeProvePredicate ( Span ) ,
420426}
421427
422428// `SubregionOrigin` is used a lot. Make sure it doesn't unintentionally get bigger.
@@ -2001,6 +2007,7 @@ impl<'tcx> SubregionOrigin<'tcx> {
20012007 DataBorrowed ( _, a) => a,
20022008 ReferenceOutlivesReferent ( _, a) => a,
20032009 CompareImplItemObligation { span, .. } => span,
2010+ AscribeUserTypeProvePredicate ( span) => span,
20042011 CheckAssociatedTypeBounds { ref parent, .. } => parent. span ( ) ,
20052012 }
20062013 }
@@ -2033,6 +2040,10 @@ impl<'tcx> SubregionOrigin<'tcx> {
20332040 parent : Box :: new ( default ( ) ) ,
20342041 } ,
20352042
2043+ traits:: ObligationCauseCode :: AscribeUserTypeProvePredicate ( span) => {
2044+ SubregionOrigin :: AscribeUserTypeProvePredicate ( span)
2045+ }
2046+
20362047 _ => default ( ) ,
20372048 }
20382049 }
0 commit comments