fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

1.43.1
958 B30 linesraw
1error: this arithmetic operation will overflow
2  --> $DIR/issue-69020.rs:21:22
3   |
4LL |     const NEG: i32 = -i32::MIN + T::NEG;
5   |                      ^^^^^^^^^ attempt to negate with overflow
6   |
7   = note: `#[deny(arithmetic_overflow)]` on by default
8
9error: this arithmetic operation will overflow
10  --> $DIR/issue-69020.rs:23:22
11   |
12LL |     const ADD: i32 = (i32::MAX+1) + T::ADD;
13   |                      ^^^^^^^^^^^^ attempt to add with overflow
14
15error: this operation will panic at runtime
16  --> $DIR/issue-69020.rs:25:22
17   |
18LL |     const DIV: i32 = (1/0) + T::DIV;
19   |                      ^^^^^ attempt to divide by zero
20   |
21   = note: `#[deny(unconditional_panic)]` on by default
22
23error: this operation will panic at runtime
24  --> $DIR/issue-69020.rs:27:22
25   |
26LL |     const OOB: i32 = [1][1] + T::OOB;
27   |                      ^^^^^^ index out of bounds: the len is 1 but the index is 1
28
29error: aborting due to 4 previous errors
30