2018-01-25 14:15:12 +01:00
|
|
|
error[E0080]: constant evaluation error
|
2018-03-05 10:21:11 +01:00
|
|
|
--> $DIR/conditional_array_execution.rs:16:20
|
2018-01-25 14:15:12 +01:00
|
|
|
|
|
2018-03-05 10:21:11 +01:00
|
|
|
LL | println!("{}", FOO); //~ E0080
|
|
|
|
| ^^^ referenced constant has errors
|
2018-01-25 14:15:12 +01:00
|
|
|
|
|
|
|
error[E0080]: constant evaluation error
|
2018-03-05 10:21:11 +01:00
|
|
|
--> $DIR/conditional_array_execution.rs:13:19
|
2018-01-25 14:15:12 +01:00
|
|
|
|
|
2018-03-05 10:21:11 +01:00
|
|
|
LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize]; //~ E0080
|
|
|
|
| ^^^^^ attempt to subtract with overflow
|
2018-01-25 14:15:12 +01:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
2018-03-05 10:21:11 +01:00
|
|
|
If you want more information on this error, try using "rustc --explain E0080"
|