rust/tests/ui/floating_point_powi.stderr
2020-07-06 13:23:17 -03:00

34 lines
1.1 KiB
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: square can be computed more accurately
--> $DIR/floating_point_powi.rs:11:14
|
LL | let _ = (x.powi(2) + y).sqrt();
| ^^^^^^^^^ help: consider using: `x * x`
error: square can be computed more accurately
--> $DIR/floating_point_powi.rs:12:18
|
LL | let _ = (x + y.powi(2)).sqrt();
| ^^^^^^^^^ help: consider using: `y * y`
error: hypotenuse can be computed more accurately
--> $DIR/floating_point_powi.rs:16:13
|
LL | let _ = (x.powi(2) + y.powi(2)).sqrt();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.hypot(y)`
error: aborting due to 5 previous errors