Skip to content

Commit fda9b83

Browse files
committed
regionck.rs: add a delayed_span_bug call to validate an asserrtion
1 parent 213326c commit fda9b83

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/librustc_typeck/check/regionck.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1549,10 +1549,13 @@ fn components_must_outlive<'a, 'tcx>(rcx: &Rcx<'a, 'tcx>,
15491549
outlives::Component::EscapingProjection(subcomponents) => {
15501550
components_must_outlive(rcx, origin, subcomponents, region);
15511551
}
1552-
outlives::Component::UnresolvedInferenceVariable(_) => {
1552+
outlives::Component::UnresolvedInferenceVariable(v) => {
15531553
// ignore this, we presume it will yield an error
15541554
// later, since if a type variable is not resolved by
15551555
// this point it never will be
1556+
rcx.tcx().sess.delay_span_bug(
1557+
origin.span(),
1558+
&format!("unresolved inference variable in outlives: {:?}", v));
15561559
}
15571560
outlives::Component::RFC1214(subcomponents) => {
15581561
let suborigin = infer::RFC1214Subregion(Rc::new(origin));

0 commit comments

Comments
 (0)