about summary refs log tree commit diff
path: root/tests/ui/manual_float_methods.fixed
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/manual_float_methods.fixed')
-rw-r--r--tests/ui/manual_float_methods.fixed37
1 files changed, 0 insertions, 37 deletions
diff --git a/tests/ui/manual_float_methods.fixed b/tests/ui/manual_float_methods.fixed
deleted file mode 100644
index 87a23b5a75b..00000000000
--- a/tests/ui/manual_float_methods.fixed
+++ /dev/null
@@ -1,37 +0,0 @@
-//@run-rustfix
-//@aux-build:proc_macros.rs:proc-macro
-#![allow(clippy::needless_if, unused)]
-#![warn(clippy::manual_is_infinite, clippy::manual_is_finite)]
-
-#[macro_use]
-extern crate proc_macros;
-
-const INFINITE: f32 = f32::INFINITY;
-const NEG_INFINITE: f32 = f32::NEG_INFINITY;
-
-fn main() {
-    let x = 1.0f32;
-    if x.is_infinite() {}
-    if x.is_finite() {}
-    if x.is_infinite() {}
-    if x.is_finite() {}
-    let x = 1.0f64;
-    if x.is_infinite() {}
-    if x.is_finite() {}
-    // Don't lint
-    if x.is_infinite() {}
-    if x.is_finite() {}
-    // If they're doing it this way, they probably know what they're doing
-    if x.abs() < f64::INFINITY {}
-    external! {
-        let x = 1.0;
-        if x == f32::INFINITY || x == f32::NEG_INFINITY {}
-        if x != f32::INFINITY && x != f32::NEG_INFINITY {}
-    }
-    with_span! {
-        span
-        let x = 1.0;
-        if x == f32::INFINITY || x == f32::NEG_INFINITY {}
-        if x != f32::INFINITY && x != f32::NEG_INFINITY {}
-    }
-}