fork/rust
git clone https://git.julia.blue/fork/rust
8d69840ab92
1.43.1
1warning: this arithmetic operation will overflow 2 --> $DIR/promoted_errors.rs:14:14 3 | 4LL | let _x = 0u32 - 1; 5 | ^^^^^^^^ attempt to subtract with overflow 6 | 7note: the lint level is defined here 8 --> $DIR/promoted_errors.rs:9:20 9 | 10LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)] 11 | ^^^^^^^^^^^^^^^^^^^ 12 13warning: this operation will panic at runtime 14 --> $DIR/promoted_errors.rs:16:20 15 | 16LL | println!("{}", 1 / (1 - 1)); 17 | ^^^^^^^^^^^ attempt to divide by zero 18 | 19note: the lint level is defined here 20 --> $DIR/promoted_errors.rs:9:41 21 | 22LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)] 23 | ^^^^^^^^^^^^^^^^^^^ 24 25warning: reaching this expression at runtime will panic or abort 26 --> $DIR/promoted_errors.rs:16:20 27 | 28LL | println!("{}", 1 / (1 - 1)); 29 | ^^^^^^^^^^^ dividing by zero 30 | 31note: the lint level is defined here 32 --> $DIR/promoted_errors.rs:9:9 33 | 34LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)] 35 | ^^^^^^^^^ 36 37warning: erroneous constant used 38 --> $DIR/promoted_errors.rs:16:20 39 | 40LL | println!("{}", 1 / (1 - 1)); 41 | ^^^^^^^^^^^ referenced constant has errors 42 43warning: this operation will panic at runtime 44 --> $DIR/promoted_errors.rs:20:14 45 | 46LL | let _x = 1 / (1 - 1); 47 | ^^^^^^^^^^^ attempt to divide by zero 48 49warning: this operation will panic at runtime 50 --> $DIR/promoted_errors.rs:22:20 51 | 52LL | println!("{}", 1 / (false as u32)); 53 | ^^^^^^^^^^^^^^^^^^ attempt to divide by zero 54 55warning: reaching this expression at runtime will panic or abort 56 --> $DIR/promoted_errors.rs:22:20 57 | 58LL | println!("{}", 1 / (false as u32)); 59 | ^^^^^^^^^^^^^^^^^^ dividing by zero 60 61warning: erroneous constant used 62 --> $DIR/promoted_errors.rs:22:20 63 | 64LL | println!("{}", 1 / (false as u32)); 65 | ^^^^^^^^^^^^^^^^^^ referenced constant has errors 66 67warning: this operation will panic at runtime 68 --> $DIR/promoted_errors.rs:26:14 69 | 70LL | let _x = 1 / (false as u32); 71 | ^^^^^^^^^^^^^^^^^^ attempt to divide by zero 72