rust-clippy/tests/ui/floating_point_powi.stderr

17 lines
472 B
Text
Raw Normal View History

2020-04-03 16:58:52 +00:00
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