2021-01-01 13:47:45 +00:00
|
|
|
warning: any use of this value will cause an error
|
|
|
|
--> $DIR/const-eval-query-stack.rs:20:16
|
2020-08-19 10:05:32 +00:00
|
|
|
|
|
2021-01-01 13:47:45 +00:00
|
|
|
LL | const X: i32 = 1 / 0;
|
|
|
|
| ---------------^^^^^-
|
|
|
|
| |
|
|
|
|
| attempt to divide `1_i32` by zero
|
|
|
|
|
|
|
|
|
note: the lint level is defined here
|
|
|
|
--> $DIR/const-eval-query-stack.rs:19:8
|
2020-08-19 10:05:32 +00:00
|
|
|
|
|
2021-01-01 13:47:45 +00:00
|
|
|
LL | #[warn(const_err)]
|
|
|
|
| ^^^^^^^^^
|
2020-08-19 10:05:32 +00:00
|
|
|
|
2021-01-01 13:47:45 +00:00
|
|
|
error[E0080]: evaluation of constant expression failed
|
|
|
|
--> $DIR/const-eval-query-stack.rs:23:27
|
|
|
|
|
|
|
|
|
LL | let x: &'static i32 = &X;
|
|
|
|
| ^-
|
|
|
|
| |
|
|
|
|
| referenced constant has errors
|
2020-08-19 10:05:32 +00:00
|
|
|
query stack during panic:
|
2021-01-01 13:47:45 +00:00
|
|
|
#0 [normalize_generic_arg_after_erasing_regions] normalizing `main::promoted[1]`
|
|
|
|
#1 [optimized_mir] optimizing MIR for `main`
|
|
|
|
#2 [collect_and_partition_mono_items] collect_and_partition_mono_items
|
2020-08-19 10:05:32 +00:00
|
|
|
end of query stack
|