2018-03-06 11:43:02 +00:00
|
|
|
warning: attempt to subtract with overflow
|
|
|
|
--> $DIR/conditional_array_execution.rs:13:19
|
2018-01-25 13:15:12 +00:00
|
|
|
|
|
2018-03-06 11:43:02 +00:00
|
|
|
LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
= note: #[warn(const_err)] on by default
|
2018-01-25 13:15:12 +00:00
|
|
|
|
|
|
|
error[E0080]: constant evaluation error
|
2018-03-06 11:43:02 +00:00
|
|
|
--> $DIR/conditional_array_execution.rs:17:20
|
2018-01-25 13:15:12 +00:00
|
|
|
|
|
2018-03-06 11:43:02 +00:00
|
|
|
LL | println!("{}", FOO); //~ E0080
|
|
|
|
| ^^^ referenced constant has errors
|
2018-01-25 13:15:12 +00:00
|
|
|
|
2018-03-06 11:43:02 +00:00
|
|
|
error: aborting due to previous error
|
2018-01-25 13:15:12 +00:00
|
|
|
|
2018-03-03 14:59:40 +00:00
|
|
|
For more information about this error, try `rustc --explain E0080`.
|