warning: any use of this value will cause an error --> $DIR/promoted_errors.rs:17:5 | LL | 1 / 0 | ^^^^^ | | | attempt to divide `1_i32` by zero | inside `div_by_zero1` at $DIR/promoted_errors.rs:17:5 | inside `X` at $DIR/promoted_errors.rs:33:29 ... LL | / const X: () = { LL | | let _x: &'static u32 = &overflow(); LL | | LL | | let _x: &'static i32 = &div_by_zero1(); ... | LL | | let _x: &'static i32 = &oob(); LL | | }; | |__- | note: the lint level is defined here --> $DIR/promoted_errors.rs:9:9 | LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)] | ^^^^^^^^^ warning: any use of this value will cause an error --> $DIR/promoted_errors.rs:33:28 | LL | / const X: () = { LL | | let _x: &'static u32 = &overflow(); LL | | LL | | let _x: &'static i32 = &div_by_zero1(); | | ^^^^^^^^^^^^^^^ referenced constant has errors ... | LL | | let _x: &'static i32 = &oob(); LL | | }; | |__- warning: 2 warnings emitted