diff options
| author | Oliver Schneider <git-no-reply-9879165716479413131@oli-obk.de> | 2018-04-08 22:26:28 +0200 |
|---|---|---|
| committer | Oliver Schneider <git-no-reply-9879165716479413131@oli-obk.de> | 2018-04-15 15:08:37 +0200 |
| commit | a406af885d68d86780651f51a778267df13f23ae (patch) | |
| tree | 4ca1ba29248cabeae0f22347d6005a58fc730c9d /src/test/ui/const-eval/conditional_array_execution.rs | |
| parent | 602b3957f152a486e57f7fbaa15265d8a81017bc (diff) | |
Only warn on erroneous promoted constants
Diffstat (limited to 'src/test/ui/const-eval/conditional_array_execution.rs')
| -rw-r--r-- | src/test/ui/const-eval/conditional_array_execution.rs | 5 |
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 } |
