]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/modulo_one.stderr
New upstream version 1.52.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / modulo_one.stderr
CommitLineData
f20569fa
XL
1error: this arithmetic operation will overflow
2 --> $DIR/modulo_one.rs:11:5
3 |
4LL | i32::MIN % (-1); // also caught by rustc
5 | ^^^^^^^^^^^^^^^ attempt to compute the remainder of `i32::MIN % -1_i32`, which would overflow
6 |
7 = note: `#[deny(arithmetic_overflow)]` on by default
8
9error: this arithmetic operation will overflow
10 --> $DIR/modulo_one.rs:21:5
11 |
12LL | INT_MIN % NEG_ONE; // also caught by rustc
13 | ^^^^^^^^^^^^^^^^^ attempt to compute the remainder of `i64::MIN % -1_i64`, which would overflow
14
15error: this arithmetic operation will overflow
16 --> $DIR/modulo_one.rs:22:5
17 |
18LL | INT_MIN % STATIC_NEG_ONE; // ONLY caught by rustc
19 | ^^^^^^^^^^^^^^^^^^^^^^^^ attempt to compute the remainder of `i64::MIN % -1_i64`, which would overflow
20
21error: any number modulo 1 will be 0
22 --> $DIR/modulo_one.rs:8:5
23 |
24LL | 10 % 1;
25 | ^^^^^^
26 |
27 = note: `-D clippy::modulo-one` implied by `-D warnings`
28
29error: any number modulo -1 will panic/overflow or result in 0
30 --> $DIR/modulo_one.rs:9:5
31 |
32LL | 10 % -1;
33 | ^^^^^^^
34
35error: any number modulo -1 will panic/overflow or result in 0
36 --> $DIR/modulo_one.rs:11:5
37 |
38LL | i32::MIN % (-1); // also caught by rustc
39 | ^^^^^^^^^^^^^^^
40
41error: the operation is ineffective. Consider reducing it to `1`
42 --> $DIR/modulo_one.rs:13:22
43 |
44LL | const ONE: u32 = 1 * 1;
45 | ^^^^^
46 |
47 = note: `-D clippy::identity-op` implied by `-D warnings`
48
49error: the operation is ineffective. Consider reducing it to `1`
50 --> $DIR/modulo_one.rs:13:22
51 |
52LL | const ONE: u32 = 1 * 1;
53 | ^^^^^
54
55error: any number modulo 1 will be 0
56 --> $DIR/modulo_one.rs:17:5
57 |
58LL | 2 % ONE;
59 | ^^^^^^^
60
61error: any number modulo -1 will panic/overflow or result in 0
62 --> $DIR/modulo_one.rs:19:5
63 |
64LL | 2 % NEG_ONE;
65 | ^^^^^^^^^^^
66
67error: any number modulo -1 will panic/overflow or result in 0
68 --> $DIR/modulo_one.rs:21:5
69 |
70LL | INT_MIN % NEG_ONE; // also caught by rustc
71 | ^^^^^^^^^^^^^^^^^
72
73error: aborting due to 11 previous errors
74