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