36 lines
1.3 KiB
Plaintext
36 lines
1.3 KiB
Plaintext
error: manually reimplementing `div_ceil`
|
|
--> tests/ui/manual_div_ceil.rs:9:13
|
|
|
|
|
LL | let _ = (x + (y - 1)) / y;
|
|
| ^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `x.div_ceil(y)`
|
|
|
|
|
= note: `-D clippy::manual-div-ceil` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::manual_div_ceil)]`
|
|
|
|
error: manually reimplementing `div_ceil`
|
|
--> tests/ui/manual_div_ceil.rs:10:13
|
|
|
|
|
LL | let _ = ((y - 1) + x) / y;
|
|
| ^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `x.div_ceil(y)`
|
|
|
|
error: manually reimplementing `div_ceil`
|
|
--> tests/ui/manual_div_ceil.rs:11:13
|
|
|
|
|
LL | let _ = (x + y - 1) / y;
|
|
| ^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `x.div_ceil(y)`
|
|
|
|
error: manually reimplementing `div_ceil`
|
|
--> tests/ui/manual_div_ceil.rs:13:13
|
|
|
|
|
LL | let _ = (7_u32 + (4 - 1)) / 4;
|
|
| ^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `7_u32.div_ceil(4)`
|
|
|
|
error: manually reimplementing `div_ceil`
|
|
--> tests/ui/manual_div_ceil.rs:14:13
|
|
|
|
|
LL | let _ = (7_i32 as u32 + (4 - 1)) / 4;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `(7_i32 as u32).div_ceil(4)`
|
|
|
|
error: aborting due to 5 previous errors
|
|
|