From 046482e95e1b01a7f2ef01ffb7592db5045ad508 Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Wed, 19 Sep 2018 11:07:43 +0300 Subject: [PATCH] rustc: future-proof error reporting for polymorphic constants in types. --- src/librustc/traits/error_reporting.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/librustc/traits/error_reporting.rs b/src/librustc/traits/error_reporting.rs index 466d472cca338..44e99e182a92f 100644 --- a/src/librustc/traits/error_reporting.rs +++ b/src/librustc/traits/error_reporting.rs @@ -846,7 +846,11 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { "could not evaluate constant expression", ) { Some(err) => err, - None => return, + None => { + self.tcx.sess.delay_span_bug(span, + &format!("constant in type had an ignored error: {:?}", err)); + return; + } } }