warning: attempt to subtract with overflow --> $DIR/promoted_errors2.rs:7:20 | LL | println!("{}", 0u32 - 1); | ^^^^^^^^ | note: lint level defined here --> $DIR/promoted_errors2.rs:4:9 | LL | #![warn(const_err)] | ^^^^^^^^^ warning: attempt to subtract with overflow --> $DIR/promoted_errors2.rs:9:14 | LL | let _x = 0u32 - 1; | ^^^^^^^^ warning: attempt to divide by zero --> $DIR/promoted_errors2.rs:11:20 | LL | println!("{}", 1 / (1 - 1)); | ^^^^^^^^^^^ warning: reaching this expression at runtime will panic or abort --> $DIR/promoted_errors2.rs:11:20 | LL | println!("{}", 1 / (1 - 1)); | ^^^^^^^^^^^ dividing by zero warning: erroneous constant used --> $DIR/promoted_errors2.rs:11:20 | LL | println!("{}", 1 / (1 - 1)); | ^^^^^^^^^^^ referenced constant has errors warning: attempt to divide by zero --> $DIR/promoted_errors2.rs:15:14 | LL | let _x = 1 / (1 - 1); | ^^^^^^^^^^^ warning: attempt to divide by zero --> $DIR/promoted_errors2.rs:17:20 | LL | println!("{}", 1 / (false as u32)); | ^^^^^^^^^^^^^^^^^^ warning: reaching this expression at runtime will panic or abort --> $DIR/promoted_errors2.rs:17:20 | LL | println!("{}", 1 / (false as u32)); | ^^^^^^^^^^^^^^^^^^ dividing by zero warning: erroneous constant used --> $DIR/promoted_errors2.rs:17:20 | LL | println!("{}", 1 / (false as u32)); | ^^^^^^^^^^^^^^^^^^ referenced constant has errors warning: attempt to divide by zero --> $DIR/promoted_errors2.rs:21:14 | LL | let _x = 1 / (false as u32); | ^^^^^^^^^^^^^^^^^^