mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-14 17:07:17 +00:00
17 lines
472 B
Text
17 lines
472 B
Text
|
error: square can be computed more accurately
|
||
|
--> $DIR/floating_point_powi.rs:7:13
|
||
|
|
|
||
|
LL | let _ = x.powi(2);
|
||
|
| ^^^^^^^^^ help: consider using: `x * x`
|
||
|
|
|
||
|
= note: `-D clippy::imprecise-flops` implied by `-D warnings`
|
||
|
|
||
|
error: square can be computed more accurately
|
||
|
--> $DIR/floating_point_powi.rs:8:13
|
||
|
|
|
||
|
LL | let _ = x.powi(1 + 1);
|
||
|
| ^^^^^^^^^^^^^ help: consider using: `x * x`
|
||
|
|
||
|
error: aborting due to 2 previous errors
|
||
|
|