From fda9b8396057426e86409fd75c69d896b05c372e Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Wed, 12 Aug 2015 10:19:02 -0400 Subject: [PATCH] regionck.rs: add a delayed_span_bug call to validate an asserrtion --- src/librustc_typeck/check/regionck.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/librustc_typeck/check/regionck.rs b/src/librustc_typeck/check/regionck.rs index 1d575128663d..49070c2d6e03 100644 --- a/src/librustc_typeck/check/regionck.rs +++ b/src/librustc_typeck/check/regionck.rs @@ -1549,10 +1549,13 @@ fn components_must_outlive<'a, 'tcx>(rcx: &Rcx<'a, 'tcx>, outlives::Component::EscapingProjection(subcomponents) => { components_must_outlive(rcx, origin, subcomponents, region); } - outlives::Component::UnresolvedInferenceVariable(_) => { + outlives::Component::UnresolvedInferenceVariable(v) => { // ignore this, we presume it will yield an error // later, since if a type variable is not resolved by // this point it never will be + rcx.tcx().sess.delay_span_bug( + origin.span(), + &format!("unresolved inference variable in outlives: {:?}", v)); } outlives::Component::RFC1214(subcomponents) => { let suborigin = infer::RFC1214Subregion(Rc::new(origin));