about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvarkor <github@varkor.com>2019-05-30 23:43:04 +0100
committervarkor <github@varkor.com>2019-05-31 01:19:59 +0100
commiteb0afe1845c970f6dd16bc53fa7f3464ee76daff (patch)
treec95ac9fb80bca0e2c1834af71bdafeeee04ea321
parent0bfbaa6e8dfb509b453020740fd37c7a22882c87 (diff)
downloadrust-eb0afe1845c970f6dd16bc53fa7f3464ee76daff.tar.gz
rust-eb0afe1845c970f6dd16bc53fa7f3464ee76daff.zip
Add more information in ConstEvalFailure error
-rw-r--r--src/librustc/traits/error_reporting.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/librustc/traits/error_reporting.rs b/src/librustc/traits/error_reporting.rs
index a29b173880a..95312d55b3b 100644
--- a/src/librustc/traits/error_reporting.rs
+++ b/src/librustc/traits/error_reporting.rs
@@ -914,8 +914,11 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
             }
 
             // already reported in the query
-            ConstEvalFailure(_) => {
-                self.tcx.sess.delay_span_bug(span, "constant in type had an ignored error");
+            ConstEvalFailure(err) => {
+                self.tcx.sess.delay_span_bug(
+                    span,
+                    &format!("constant in type had an ignored error: {:?}", err),
+                );
                 return;
             }