fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: strict comparison of `f32` or `f64` 2 --> $DIR/float_cmp.rs:70:5 3 | 4LL | ONE as f64 != 2.0; 5 | ^^^^^^^^^^^^^^^^^ help: consider comparing them within some margin of error: `(ONE as f64 - 2.0).abs() > error_margin` 6 | 7 = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin` 8 = note: `-D clippy::float-cmp` implied by `-D warnings` 9 = help: to override `-D warnings` add `#[allow(clippy::float_cmp)]` 10 11error: strict comparison of `f32` or `f64` 12 --> $DIR/float_cmp.rs:77:5 13 | 14LL | x == 1.0; 15 | ^^^^^^^^ help: consider comparing them within some margin of error: `(x - 1.0).abs() < error_margin` 16 | 17 = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin` 18 19error: strict comparison of `f32` or `f64` 20 --> $DIR/float_cmp.rs:82:5 21 | 22LL | twice(x) != twice(ONE as f64); 23 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider comparing them within some margin of error: `(twice(x) - twice(ONE as f64)).abs() > error_margin` 24 | 25 = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin` 26 27error: strict comparison of `f32` or `f64` 28 --> $DIR/float_cmp.rs:104:5 29 | 30LL | NON_ZERO_ARRAY[i] == NON_ZERO_ARRAY[j]; 31 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider comparing them within some margin of error: `(NON_ZERO_ARRAY[i] - NON_ZERO_ARRAY[j]).abs() < error_margin` 32 | 33 = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin` 34 35error: strict comparison of `f32` or `f64` arrays 36 --> $DIR/float_cmp.rs:111:5 37 | 38LL | a1 == a2; 39 | ^^^^^^^^ 40 | 41 = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin` 42 43error: strict comparison of `f32` or `f64` 44 --> $DIR/float_cmp.rs:114:5 45 | 46LL | a1[0] == a2[0]; 47 | ^^^^^^^^^^^^^^ help: consider comparing them within some margin of error: `(a1[0] - a2[0]).abs() < error_margin` 48 | 49 = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin` 50 51error: aborting due to 6 previous errors 52