1 warning: this arithmetic operation will overflow
2 --> $DIR/promoted_errors.rs:15:5
5 | ^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
7 note: the lint level is defined here
8 --> $DIR/promoted_errors.rs:11:20
10 LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)]
13 warning: this operation will panic at runtime
14 --> $DIR/promoted_errors.rs:21:5
17 | ^^^^^ attempt to divide `1_i32` by zero
19 note: the lint level is defined here
20 --> $DIR/promoted_errors.rs:11:41
22 LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)]
25 warning: this operation will panic at runtime
26 --> $DIR/promoted_errors.rs:27:5
29 | ^^^^^^^^^^^ attempt to divide `1_i32` by zero
31 warning: this operation will panic at runtime
32 --> $DIR/promoted_errors.rs:31:5
34 LL | 1 / (false as i32)
35 | ^^^^^^^^^^^^^^^^^^ attempt to divide `1_i32` by zero
37 warning: this operation will panic at runtime
38 --> $DIR/promoted_errors.rs:35:5
41 | ^^^^^^^^^^^^ index out of bounds: the length is 3 but the index is 4
43 warning: any use of this value will cause an error
44 --> $DIR/promoted_errors.rs:15:5
49 | attempt to compute `0_u32 - 1_u32`, which would overflow
50 | inside `overflow` at $DIR/promoted_errors.rs:15:5
51 | inside `X` at $DIR/promoted_errors.rs:43:29
56 note: the lint level is defined here
57 --> $DIR/promoted_errors.rs:11:9
59 LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)]
61 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
62 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
64 warning: any use of this value will cause an error
65 --> $DIR/promoted_errors.rs:43:28
69 LL | let _x: &'static u32 = &overflow();
70 | ^^^^^^^^^^^ referenced constant has errors
72 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
73 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
75 warning: 7 warnings emitted
77 Future incompatibility report: Future breakage diagnostic:
78 warning: any use of this value will cause an error
79 --> $DIR/promoted_errors.rs:15:5
84 | attempt to compute `0_u32 - 1_u32`, which would overflow
85 | inside `overflow` at $DIR/promoted_errors.rs:15:5
86 | inside `X` at $DIR/promoted_errors.rs:43:29
91 note: the lint level is defined here
92 --> $DIR/promoted_errors.rs:11:9
94 LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)]
96 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
97 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
99 Future breakage diagnostic:
100 warning: any use of this value will cause an error
101 --> $DIR/promoted_errors.rs:43:28
105 LL | let _x: &'static u32 = &overflow();
106 | ^^^^^^^^^^^ referenced constant has errors
108 note: the lint level is defined here
109 --> $DIR/promoted_errors.rs:11:9
111 LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)]
113 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
114 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>