@@ -409,14 +409,20 @@ pub enum SubregionOrigin<'tcx> {
409
409
410
410
/// Comparing the signature and requirements of an impl method against
411
411
/// 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
+ } ,
413
417
414
418
/// Checking that the bounds of a trait's associated type hold for a given impl
415
419
CheckAssociatedTypeBounds {
416
420
parent : Box < SubregionOrigin < ' tcx > > ,
417
421
impl_item_def_id : LocalDefId ,
418
422
trait_item_def_id : DefId ,
419
423
} ,
424
+
425
+ AscribeUserTypeProvePredicate ( Span ) ,
420
426
}
421
427
422
428
// `SubregionOrigin` is used a lot. Make sure it doesn't unintentionally get bigger.
@@ -2001,6 +2007,7 @@ impl<'tcx> SubregionOrigin<'tcx> {
2001
2007
DataBorrowed ( _, a) => a,
2002
2008
ReferenceOutlivesReferent ( _, a) => a,
2003
2009
CompareImplItemObligation { span, .. } => span,
2010
+ AscribeUserTypeProvePredicate ( span) => span,
2004
2011
CheckAssociatedTypeBounds { ref parent, .. } => parent. span ( ) ,
2005
2012
}
2006
2013
}
@@ -2033,6 +2040,10 @@ impl<'tcx> SubregionOrigin<'tcx> {
2033
2040
parent : Box :: new ( default ( ) ) ,
2034
2041
} ,
2035
2042
2043
+ traits:: ObligationCauseCode :: AscribeUserTypeProvePredicate ( span) => {
2044
+ SubregionOrigin :: AscribeUserTypeProvePredicate ( span)
2045
+ }
2046
+
2036
2047
_ => default ( ) ,
2037
2048
}
2038
2049
}
0 commit comments