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