1
Fork 0
rust/src/test/ui/const-eval/conditional_array_execution.stderr

16 lines
536 B
Text
Raw Normal View History

error[E0080]: constant evaluation error
2018-03-05 10:21:11 +01:00
--> $DIR/conditional_array_execution.rs:16:20
|
2018-03-05 10:21:11 +01:00
LL | println!("{}", FOO); //~ E0080
| ^^^ referenced constant has errors
error[E0080]: constant evaluation error
2018-03-05 10:21:11 +01:00
--> $DIR/conditional_array_execution.rs:13:19
|
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
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"