]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/const-eval/promoted_errors.noopt.stderr
Bless and update consts tests
[rust.git] / tests / ui / consts / const-eval / promoted_errors.noopt.stderr
1 warning: this arithmetic operation will overflow
2   --> $DIR/promoted_errors.rs:15:5
3    |
4 LL |     0 - 1
5    |     ^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
6    |
7 note: the lint level is defined here
8   --> $DIR/promoted_errors.rs:11:9
9    |
10 LL | #![warn(arithmetic_overflow, unconditional_panic)]
11    |         ^^^^^^^^^^^^^^^^^^^
12
13 warning: this operation will panic at runtime
14   --> $DIR/promoted_errors.rs:19:5
15    |
16 LL |     1 / 0
17    |     ^^^^^ attempt to divide `1_i32` by zero
18    |
19 note: the lint level is defined here
20   --> $DIR/promoted_errors.rs:11:30
21    |
22 LL | #![warn(arithmetic_overflow, unconditional_panic)]
23    |                              ^^^^^^^^^^^^^^^^^^^
24
25 warning: this operation will panic at runtime
26   --> $DIR/promoted_errors.rs:23:5
27    |
28 LL |     1 / (1 - 1)
29    |     ^^^^^^^^^^^ attempt to divide `1_i32` by zero
30
31 warning: this operation will panic at runtime
32   --> $DIR/promoted_errors.rs:27:5
33    |
34 LL |     1 / (false as i32)
35    |     ^^^^^^^^^^^^^^^^^^ attempt to divide `1_i32` by zero
36
37 warning: this operation will panic at runtime
38   --> $DIR/promoted_errors.rs:31:5
39    |
40 LL |     [1, 2, 3][4]
41    |     ^^^^^^^^^^^^ index out of bounds: the length is 3 but the index is 4
42
43 warning: 5 warnings emitted
44