about summary refs log tree commit diff
path: root/src/test/ui/const-eval/conditional_array_execution.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-04-23 22:58:00 +0000
committerbors <bors@rust-lang.org>2018-04-23 22:58:00 +0000
commit725c9b0ede0b222cd64a8dc87cbeed052ecad157 (patch)
tree6155cfe6c7fffd4979e9ea8798b14e10b7b795a9 /src/test/ui/const-eval/conditional_array_execution.rs
parent0135bf647c266052f8428601a72a77dd51bf6437 (diff)
parentbb367c47201c7f1acba702e49be1f4bcdf4221ef (diff)
Auto merge of #49779 - oli-obk:const_err_regression, r=eddyb
Don't report compile-time errors for promoteds

Fixes the regression part of #49760, the missing warnings still are missing

r? @eddyb
Diffstat (limited to 'src/test/ui/const-eval/conditional_array_execution.rs')
-rw-r--r--src/test/ui/const-eval/conditional_array_execution.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/ui/const-eval/conditional_array_execution.rs b/src/test/ui/const-eval/conditional_array_execution.rs
index 324bcf60e8f..e059c354d65 100644
--- a/src/test/ui/const-eval/conditional_array_execution.rs
+++ b/src/test/ui/const-eval/conditional_array_execution.rs
@@ -8,11 +8,14 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+// compile-pass
+
 const X: u32 = 5;
 const Y: u32 = 6;
 const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
 //~^ WARN attempt to subtract with overflow
 
 fn main() {
-    println!("{}", FOO); //~ E0080
+    println!("{}", FOO);
+    //~^ WARN constant evaluation error
 }