rust/src/test/ui/const-eval/conditional_array_execution.stderr

21 lines
646 B
Plaintext
Raw Normal View History

warning: attempt to subtract with overflow
--> $DIR/conditional_array_execution.rs:15:19
|
LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
| ^^^^^
|
= note: #[warn(const_err)] on by default
2018-04-20 12:18:29 +00:00
warning: this constant cannot be used
--> $DIR/conditional_array_execution.rs:15:1
|
LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempt to subtract with overflow
warning: constant evaluation error
2018-04-20 12:18:29 +00:00
--> $DIR/conditional_array_execution.rs:20:20
|
LL | println!("{}", FOO);
| ^^^ referenced constant has errors