diff options
| author | Oliver Schneider <git-spam-no-reply9815368754983@oli-obk.de> | 2018-03-06 12:43:02 +0100 |
|---|---|---|
| committer | Oliver Schneider <git-spam-no-reply9815368754983@oli-obk.de> | 2018-03-08 08:35:39 +0100 |
| commit | b5ace9a906d0a445420a0ff16f77ce967722ddc6 (patch) | |
| tree | de379168cd41e525503f37c9196be4433057c9e2 /src/test/ui/const-eval/conditional_array_execution.stderr | |
| parent | edc5f7343338ddbbc2bae94be585cd821dbe8118 (diff) | |
| download | rust-b5ace9a906d0a445420a0ff16f77ce967722ddc6.tar.gz rust-b5ace9a906d0a445420a0ff16f77ce967722ddc6.zip | |
Unify the const folding errors
before they differed depending on whether optimizations were on or not
Diffstat (limited to 'src/test/ui/const-eval/conditional_array_execution.stderr')
| -rw-r--r-- | src/test/ui/const-eval/conditional_array_execution.stderr | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/test/ui/const-eval/conditional_array_execution.stderr b/src/test/ui/const-eval/conditional_array_execution.stderr index 8d421f401ca..4cf12e22283 100644 --- a/src/test/ui/const-eval/conditional_array_execution.stderr +++ b/src/test/ui/const-eval/conditional_array_execution.stderr @@ -1,15 +1,17 @@ -error[E0080]: constant evaluation error - --> $DIR/conditional_array_execution.rs:16:20 +warning: attempt to subtract with overflow + --> $DIR/conditional_array_execution.rs:13:19 | -LL | println!("{}", FOO); //~ E0080 - | ^^^ referenced constant has errors +LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize]; + | ^^^^^ + | + = note: #[warn(const_err)] on by default error[E0080]: constant evaluation error - --> $DIR/conditional_array_execution.rs:13:19 + --> $DIR/conditional_array_execution.rs:17:20 | -LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize]; //~ E0080 - | ^^^^^ attempt to subtract with overflow +LL | println!("{}", FOO); //~ E0080 + | ^^^ referenced constant has errors -error: aborting due to 2 previous errors +error: aborting due to previous error If you want more information on this error, try using "rustc --explain E0080" |
