about summary refs log tree commit diff
path: root/src/test/ui/consts/const-eval/conditional_array_execution.stderr
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-10-26 11:05:00 +0000
committerbors <bors@rust-lang.org>2018-10-26 11:05:00 +0000
commit694cf752988728ba5da85c36c2deaeefeb49c05e (patch)
treef2501734f55b37ac50bf5604a897c939ccfdc996 /src/test/ui/consts/const-eval/conditional_array_execution.stderr
parent82239b04dc9cea1d54422c2fb223ff5321ccafdd (diff)
parent13d94ee1154770caa8e027394fa2221db2dfe5c3 (diff)
downloadrust-694cf752988728ba5da85c36c2deaeefeb49c05e.tar.gz
rust-694cf752988728ba5da85c36c2deaeefeb49c05e.zip
Auto merge of #53821 - oli-obk:sanity_query, r=RalfJung
Report const eval error inside the query

Functional changes: We no longer warn about bad constants embedded in unused types. This relied on being able to report just a warning, not a hard error on that case, which we cannot do any more now that error reporting is consistently centralized.

r? @RalfJung

fixes #53561
Diffstat (limited to 'src/test/ui/consts/const-eval/conditional_array_execution.stderr')
-rw-r--r--src/test/ui/consts/const-eval/conditional_array_execution.stderr15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/test/ui/consts/const-eval/conditional_array_execution.stderr b/src/test/ui/consts/const-eval/conditional_array_execution.stderr
index 29f5f8e2ade..90131080ed1 100644
--- a/src/test/ui/consts/const-eval/conditional_array_execution.stderr
+++ b/src/test/ui/consts/const-eval/conditional_array_execution.stderr
@@ -1,4 +1,4 @@
-warning: this constant cannot be used
+warning: any use of this value will cause an error
   --> $DIR/conditional_array_execution.rs:15:1
    |
 LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
@@ -12,21 +12,12 @@ note: lint level defined here
 LL | #![warn(const_err)]
    |         ^^^^^^^^^
 
-error[E0080]: referenced constant has errors
-  --> $DIR/conditional_array_execution.rs:19:20
-   |
-LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
-   |                   ----- attempt to subtract with overflow
-...
-LL |     println!("{}", FOO);
-   |                    ^^^
-
-error[E0080]: erroneous constant used
+error[E0080]: evaluation of constant expression failed
   --> $DIR/conditional_array_execution.rs:19:20
    |
 LL |     println!("{}", FOO);
    |                    ^^^ referenced constant has errors
 
-error: aborting due to 2 previous errors
+error: aborting due to previous error
 
 For more information about this error, try `rustc --explain E0080`.