blob: 9270dafbe651a4cd6d72220a42cd43cfacf5a841 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 | 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
For more information about this error, try `rustc --explain E0080`.
 |