mirror of
https://github.com/rust-lang/rust.git
synced 2025-12-30 08:15:31 +00:00
37 lines
1021 B
Plaintext
37 lines
1021 B
Plaintext
error: integer division
|
|
--> tests/ui/integer_division.rs:9:13
|
|
|
|
|
LL | let n = 1 / 2;
|
|
| ^^^^^
|
|
|
|
|
= help: division of integers may cause loss of precision. consider using floats
|
|
= note: `-D clippy::integer-division` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::integer_division)]`
|
|
|
|
error: integer division
|
|
--> tests/ui/integer_division.rs:12:13
|
|
|
|
|
LL | let o = 1 / two;
|
|
| ^^^^^^^
|
|
|
|
|
= help: division of integers may cause loss of precision. consider using floats
|
|
|
|
error: integer division
|
|
--> tests/ui/integer_division.rs:15:13
|
|
|
|
|
LL | let p = two / 4;
|
|
| ^^^^^^^
|
|
|
|
|
= help: division of integers may cause loss of precision. consider using floats
|
|
|
|
error: integer division
|
|
--> tests/ui/integer_division.rs:21:13
|
|
|
|
|
LL | let s = a / TWO;
|
|
| ^^^^^^^
|
|
|
|
|
= help: division of integers may cause loss of precision. consider using floats
|
|
|
|
error: aborting due to 4 previous errors
|
|
|