summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/floating_point_rad.stderr
blob: f12d3d23f3ab93fa38f53d5fc595857872e1d3a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
error: conversion to degrees can be done more accurately
  --> $DIR/floating_point_rad.rs:13:13
   |
LL |     let _ = x * 180f32 / std::f32::consts::PI;
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.to_degrees()`
   |
   = note: `-D clippy::suboptimal-flops` implied by `-D warnings`

error: conversion to degrees can be done more accurately
  --> $DIR/floating_point_rad.rs:14:13
   |
LL |     let _ = 90. * 180f64 / std::f64::consts::PI;
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `90.0_f64.to_degrees()`

error: conversion to degrees can be done more accurately
  --> $DIR/floating_point_rad.rs:15:13
   |
LL |     let _ = 90.5 * 180f64 / std::f64::consts::PI;
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `90.5_f64.to_degrees()`

error: conversion to radians can be done more accurately
  --> $DIR/floating_point_rad.rs:16:13
   |
LL |     let _ = x * std::f32::consts::PI / 180f32;
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.to_radians()`

error: conversion to radians can be done more accurately
  --> $DIR/floating_point_rad.rs:17:13
   |
LL |     let _ = 90. * std::f32::consts::PI / 180f32;
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `90.0_f64.to_radians()`

error: conversion to radians can be done more accurately
  --> $DIR/floating_point_rad.rs:18:13
   |
LL |     let _ = 90.5 * std::f32::consts::PI / 180f32;
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `90.5_f64.to_radians()`

error: aborting due to 6 previous errors