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

18 lines
531 B
Plaintext
Raw Normal View History

warning: attempt to subtract with overflow
--> $DIR/conditional_array_execution.rs:13:19
|
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:17:20
|
LL | println!("{}", FOO); //~ E0080
| ^^^ referenced constant has errors
error: aborting due to previous error
2018-03-03 14:59:40 +00:00
For more information about this error, try `rustc --explain E0080`.