]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/modulo_one.stderr
Auto merge of #97944 - nikic:freebsd-update, r=Mark-Simulacrum
[rust.git] / src / tools / clippy / tests / ui / modulo_one.stderr
1 error: this operation will panic at runtime
2   --> $DIR/modulo_one.rs:11:5
3    |
4 LL |     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(unconditional_panic)]` on by default
8
9 error: this operation will panic at runtime
10   --> $DIR/modulo_one.rs:21:5
11    |
12 LL |     INT_MIN % NEG_ONE; // also caught by rustc
13    |     ^^^^^^^^^^^^^^^^^ attempt to compute the remainder of `i64::MIN % -1_i64`, which would overflow
14
15 error: this operation will panic at runtime
16   --> $DIR/modulo_one.rs:22:5
17    |
18 LL |     INT_MIN % STATIC_NEG_ONE; // ONLY caught by rustc
19    |     ^^^^^^^^^^^^^^^^^^^^^^^^ attempt to compute the remainder of `i64::MIN % -1_i64`, which would overflow
20
21 error: any number modulo 1 will be 0
22   --> $DIR/modulo_one.rs:8:5
23    |
24 LL |     10 % 1;
25    |     ^^^^^^
26    |
27    = note: `-D clippy::modulo-one` implied by `-D warnings`
28
29 error: any number modulo -1 will panic/overflow or result in 0
30   --> $DIR/modulo_one.rs:9:5
31    |
32 LL |     10 % -1;
33    |     ^^^^^^^
34
35 error: any number modulo -1 will panic/overflow or result in 0
36   --> $DIR/modulo_one.rs:11:5
37    |
38 LL |     i32::MIN % (-1); // also caught by rustc
39    |     ^^^^^^^^^^^^^^^
40
41 error: any number modulo 1 will be 0
42   --> $DIR/modulo_one.rs:17:5
43    |
44 LL |     2 % ONE;
45    |     ^^^^^^^
46
47 error: any number modulo -1 will panic/overflow or result in 0
48   --> $DIR/modulo_one.rs:19:5
49    |
50 LL |     2 % NEG_ONE;
51    |     ^^^^^^^^^^^
52
53 error: any number modulo -1 will panic/overflow or result in 0
54   --> $DIR/modulo_one.rs:21:5
55    |
56 LL |     INT_MIN % NEG_ONE; // also caught by rustc
57    |     ^^^^^^^^^^^^^^^^^
58
59 error: aborting due to 9 previous errors
60