fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
951 B29 linesraw
1error: this arithmetic operation will overflow
2  --> $DIR/ice-9463.rs:3:14
3   |
4LL |     let _x = -1_i32 >> -1;
5   |              ^^^^^^^^^^^^ attempt to shift right by `-1_i32`, which would overflow
6   |
7note: the lint level is defined here
8  --> $DIR/ice-9463.rs:1:9
9   |
10LL | #![deny(arithmetic_overflow)]
11   |         ^^^^^^^^^^^^^^^^^^^
12
13error: this arithmetic operation will overflow
14  --> $DIR/ice-9463.rs:5:14
15   |
16LL |     let _y = 1u32 >> 10000000000000u32;
17   |              ^^^^^^^^^^^^^^^^^^^^^^^^^ attempt to shift right by `1316134912_u32`, which would overflow
18
19error: literal out of range for `u32`
20  --> $DIR/ice-9463.rs:5:22
21   |
22LL |     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
28error: aborting due to 3 previous errors
29