2018-03-06 12:43:02 +01:00
|
|
|
warning: attempt to subtract with overflow
|
2018-04-08 22:26:28 +02:00
|
|
|
--> $DIR/conditional_array_execution.rs:15:19
|
2018-01-25 14:15:12 +01:00
|
|
|
|
|
2018-03-06 12:43:02 +01:00
|
|
|
LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
= note: #[warn(const_err)] on by default
|
2018-01-25 14:15:12 +01:00
|
|
|
|
2018-04-08 22:26:28 +02:00
|
|
|
warning: constant evaluation error
|
|
|
|
--> $DIR/conditional_array_execution.rs:19:20
|
2018-01-25 14:15:12 +01:00
|
|
|
|
|
2018-04-08 22:26:28 +02:00
|
|
|
LL | println!("{}", FOO);
|
2018-03-06 12:43:02 +01:00
|
|
|
| ^^^ referenced constant has errors
|
2018-01-25 14:15:12 +01:00
|
|
|
|