1 warning: this arithmetic operation will overflow
2 --> $DIR/promoted_errors.rs:14:14
4 LL | let _x = 0u32 - 1;
5 | ^^^^^^^^ attempt to subtract with overflow
7 note: the lint level is defined here
8 --> $DIR/promoted_errors.rs:9:20
10 LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)]
13 warning: this operation will panic at runtime
14 --> $DIR/promoted_errors.rs:16:20
16 LL | println!("{}", 1 / (1 - 1));
17 | ^^^^^^^^^^^ attempt to divide by zero
19 note: the lint level is defined here
20 --> $DIR/promoted_errors.rs:9:41
22 LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)]
25 warning: reaching this expression at runtime will panic or abort
26 --> $DIR/promoted_errors.rs:16:20
28 LL | println!("{}", 1 / (1 - 1));
29 | ^^^^^^^^^^^ dividing by zero
31 note: the lint level is defined here
32 --> $DIR/promoted_errors.rs:9:9
34 LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)]
37 warning: erroneous constant used
38 --> $DIR/promoted_errors.rs:16:20
40 LL | println!("{}", 1 / (1 - 1));
41 | ^^^^^^^^^^^ referenced constant has errors
43 warning: this operation will panic at runtime
44 --> $DIR/promoted_errors.rs:20:14
46 LL | let _x = 1 / (1 - 1);
47 | ^^^^^^^^^^^ attempt to divide by zero
49 warning: this operation will panic at runtime
50 --> $DIR/promoted_errors.rs:22:20
52 LL | println!("{}", 1 / (false as u32));
53 | ^^^^^^^^^^^^^^^^^^ attempt to divide by zero
55 warning: reaching this expression at runtime will panic or abort
56 --> $DIR/promoted_errors.rs:22:20
58 LL | println!("{}", 1 / (false as u32));
59 | ^^^^^^^^^^^^^^^^^^ dividing by zero
61 warning: erroneous constant used
62 --> $DIR/promoted_errors.rs:22:20
64 LL | println!("{}", 1 / (false as u32));
65 | ^^^^^^^^^^^^^^^^^^ referenced constant has errors
67 warning: this operation will panic at runtime
68 --> $DIR/promoted_errors.rs:26:14
70 LL | let _x = 1 / (false as u32);
71 | ^^^^^^^^^^^^^^^^^^ attempt to divide by zero