fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.2 KiB53 linesraw
1error: conversion to radians can be done more accurately
2  --> $DIR/floating_point_rad.rs:11:13
3   |
4LL |     let _ = degrees as f64 * std::f64::consts::PI / 180.0;
5   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(degrees as f64).to_radians()`
6   |
7   = note: `-D clippy::suboptimal-flops` implied by `-D warnings`
8   = help: to override `-D warnings` add `#[allow(clippy::suboptimal_flops)]`
9
10error: conversion to degrees can be done more accurately
11  --> $DIR/floating_point_rad.rs:12:13
12   |
13LL |     let _ = degrees as f64 * 180.0 / std::f64::consts::PI;
14   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(degrees as f64).to_degrees()`
15
16error: conversion to degrees can be done more accurately
17  --> $DIR/floating_point_rad.rs:17:13
18   |
19LL |     let _ = x * 180f32 / std::f32::consts::PI;
20   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.to_degrees()`
21
22error: conversion to degrees can be done more accurately
23  --> $DIR/floating_point_rad.rs:18:13
24   |
25LL |     let _ = 90. * 180f64 / std::f64::consts::PI;
26   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `90.0_f64.to_degrees()`
27
28error: conversion to degrees can be done more accurately
29  --> $DIR/floating_point_rad.rs:19:13
30   |
31LL |     let _ = 90.5 * 180f64 / std::f64::consts::PI;
32   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `90.5_f64.to_degrees()`
33
34error: conversion to radians can be done more accurately
35  --> $DIR/floating_point_rad.rs:20:13
36   |
37LL |     let _ = x * std::f32::consts::PI / 180f32;
38   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.to_radians()`
39
40error: conversion to radians can be done more accurately
41  --> $DIR/floating_point_rad.rs:21:13
42   |
43LL |     let _ = 90. * std::f32::consts::PI / 180f32;
44   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `90.0_f64.to_radians()`
45
46error: conversion to radians can be done more accurately
47  --> $DIR/floating_point_rad.rs:22:13
48   |
49LL |     let _ = 90.5 * std::f32::consts::PI / 180f32;
50   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `90.5_f64.to_radians()`
51
52error: aborting due to 8 previous errors
53