diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2018-09-19 11:07:43 +0300 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2018-09-19 11:07:43 +0300 |
| commit | 046482e95e1b01a7f2ef01ffb7592db5045ad508 (patch) | |
| tree | b7bc189432b5b54336b7d9b793d97ea4257e9c0c | |
| parent | ff6422d7a392acfc8af28994d65af2bbaecea4f6 (diff) | |
| download | rust-046482e95e1b01a7f2ef01ffb7592db5045ad508.tar.gz rust-046482e95e1b01a7f2ef01ffb7592db5045ad508.zip | |
rustc: future-proof error reporting for polymorphic constants in types.
| -rw-r--r-- | src/librustc/traits/error_reporting.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/librustc/traits/error_reporting.rs b/src/librustc/traits/error_reporting.rs index 466d472cca3..44e99e182a9 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; + } } } |
