]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/floating_point_hypot.stderr
Merge commit '2ca58e7dda4a9eb142599638c59dc04d15961175' into clippyup
[rust.git] / src / tools / clippy / tests / ui / floating_point_hypot.stderr
1 error: hypotenuse can be computed more accurately
2   --> $DIR/floating_point_hypot.rs:7:13
3    |
4 LL |     let _ = (x * x + y * y).sqrt();
5    |             ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.hypot(y)`
6    |
7    = note: `-D clippy::imprecise-flops` implied by `-D warnings`
8
9 error: hypotenuse can be computed more accurately
10   --> $DIR/floating_point_hypot.rs:8:13
11    |
12 LL |     let _ = ((x + 1f32) * (x + 1f32) + y * y).sqrt();
13    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(x + 1f32).hypot(y)`
14
15 error: hypotenuse can be computed more accurately
16   --> $DIR/floating_point_hypot.rs:9:13
17    |
18 LL |     let _ = (x.powi(2) + y.powi(2)).sqrt();
19    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.hypot(y)`
20
21 error: aborting due to 3 previous errors
22