warning: this arithmetic operation will overflow --> $DIR/promoted_errors.rs:12:20 | LL | println!("{}", 0u32 - 1); | ^^^^^^^^ attempt to subtract with overflow | note: the lint level is defined here --> $DIR/promoted_errors.rs:9:20 | LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)] | ^^^^^^^^^^^^^^^^^^^ warning: this arithmetic operation will overflow --> $DIR/promoted_errors.rs:14:14 | LL | let _x = 0u32 - 1; | ^^^^^^^^ attempt to subtract with overflow warning: this operation will panic at runtime --> $DIR/promoted_errors.rs:16:20 | LL | println!("{}", 1 / (1 - 1)); | ^^^^^^^^^^^ attempt to divide by zero | note: the lint level is defined here --> $DIR/promoted_errors.rs:9:41 | LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)] | ^^^^^^^^^^^^^^^^^^^ warning: reaching this expression at runtime will panic or abort --> $DIR/promoted_errors.rs:16:20 | LL | println!("{}", 1 / (1 - 1)); | ^^^^^^^^^^^ dividing by zero | note: the lint level is defined here --> $DIR/promoted_errors.rs:9:9 | LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)] | ^^^^^^^^^ warning: erroneous constant used --> $DIR/promoted_errors.rs:16:20 | LL | println!("{}", 1 / (1 - 1)); | ^^^^^^^^^^^ referenced constant has errors warning: this operation will panic at runtime --> $DIR/promoted_errors.rs:20:14 | LL | let _x = 1 / (1 - 1); | ^^^^^^^^^^^ attempt to divide by zero warning: this operation will panic at runtime --> $DIR/promoted_errors.rs:22:20 | LL | println!("{}", 1 / (false as u32)); | ^^^^^^^^^^^^^^^^^^ attempt to divide by zero warning: reaching this expression at runtime will panic or abort --> $DIR/promoted_errors.rs:22:20 | LL | println!("{}", 1 / (false as u32)); | ^^^^^^^^^^^^^^^^^^ dividing by zero warning: erroneous constant used --> $DIR/promoted_errors.rs:22:20 | LL | println!("{}", 1 / (false as u32)); | ^^^^^^^^^^^^^^^^^^ referenced constant has errors warning: this operation will panic at runtime --> $DIR/promoted_errors.rs:26:14 | LL | let _x = 1 / (false as u32); | ^^^^^^^^^^^^^^^^^^ attempt to divide by zero warning: 10 warnings emitted