1
Fork 0

Point at unmet explicit lifetime obligation bound

This commit is contained in:
Esteban Küber 2021-07-30 08:12:10 -07:00
parent 7069a8c2b7
commit e5d42af6ba
24 changed files with 238 additions and 55 deletions

View file

@ -375,7 +375,7 @@ pub enum SubregionOrigin<'tcx> {
/// Some type parameter was instantiated with the given type,
/// and that type must outlive some region.
RelateParamBound(Span, Ty<'tcx>),
RelateParamBound(Span, Ty<'tcx>, Option<Span>),
/// The given region parameter was instantiated with a region
/// that must outlive some other region.
@ -1705,7 +1705,7 @@ impl<'tcx> SubregionOrigin<'tcx> {
match *self {
Subtype(ref a) => a.span(),
RelateObjectBound(a) => a,
RelateParamBound(a, _) => a,
RelateParamBound(a, ..) => a,
RelateRegionParamBound(a) => a,
Reborrow(a) => a,
ReborrowUpvar(a, _) => a,