rust/tests/ui/floating_point_powi.stderr

35 lines
1.1 KiB
Text
Raw Normal View History

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