about summary refs log tree commit diff
path: root/src/test/ui/consts/const-eval/conditional_array_execution.stderr
blob: 7f94d849c006c4610a292893af44d1a250ece4b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
warning: any use of this value will cause an error
  --> $DIR/conditional_array_execution.rs:5:19
   |
LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
   | ------------------^^^^^---------------------------
   |                   |
   |                   attempt to subtract with overflow
   |
note: lint level defined here
  --> $DIR/conditional_array_execution.rs:1:9
   |
LL | #![warn(const_err)]
   |         ^^^^^^^^^

error[E0080]: evaluation of constant expression failed
  --> $DIR/conditional_array_execution.rs:9:20
   |
LL |     println!("{}", FOO);
   |                    ^^^ referenced constant has errors

error: aborting due to previous error

For more information about this error, try `rustc --explain E0080`.