]> git.lizzy.rs Git - rust.git/blob - tests/ui/crashes/ice-9463.stderr
make const_err a hard error
[rust.git] / tests / ui / crashes / ice-9463.stderr
1 error: this arithmetic operation will overflow
2   --> $DIR/ice-9463.rs:3:14
3    |
4 LL |     let _x = -1_i32 >> -1;
5    |              ^^^^^^^^^^^^ attempt to shift right by `-1_i32`, which would overflow
6    |
7 note: the lint level is defined here
8   --> $DIR/ice-9463.rs:1:9
9    |
10 LL | #![deny(arithmetic_overflow)]
11    |         ^^^^^^^^^^^^^^^^^^^
12
13 error: this arithmetic operation will overflow
14   --> $DIR/ice-9463.rs:4:14
15    |
16 LL |     let _y = 1u32 >> 10000000000000u32;
17    |              ^^^^^^^^^^^^^^^^^^^^^^^^^ attempt to shift right by `1316134912_u32`, which would overflow
18
19 error: literal out of range for `u32`
20   --> $DIR/ice-9463.rs:4:22
21    |
22 LL |     let _y = 1u32 >> 10000000000000u32;
23    |                      ^^^^^^^^^^^^^^^^^
24    |
25    = note: the literal `10000000000000u32` does not fit into the type `u32` whose range is `0..=4294967295`
26    = note: `#[deny(overflowing_literals)]` on by default
27
28 error: aborting due to 3 previous errors
29