Skip to content

Commit 55688a8

Browse files
committed
Clean up const_float_classify leftovers
1 parent 7901289 commit 55688a8

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

clippy_lints/src/manual_float_methods.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,7 @@ impl<'tcx> LateLintPass<'tcx> for ManualFloatMethods {
9090
&& let mut exprs = [lhs_lhs, lhs_rhs, rhs_lhs, rhs_rhs]
9191
&& exprs.iter_mut().partition_in_place(|i| path_to_local(i).is_some()) == 2
9292
&& !in_external_macro(cx.sess(), expr.span)
93-
&& (
94-
matches!(cx.tcx.constness(cx.tcx.hir().enclosing_body_owner(expr.hir_id)), Constness::NotConst)
95-
|| cx.tcx.features().declared(sym!(const_float_classify))
96-
)
93+
&& matches!(cx.tcx.constness(cx.tcx.hir().enclosing_body_owner(expr.hir_id)), Constness::NotConst)
9794
&& let [first, second, const_1, const_2] = exprs
9895
&& let ecx = ConstEvalCtxt::new(cx)
9996
&& let Some(const_1) = ecx.eval(const_1)

tests/ui/manual_float_methods.rs

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ fn main() {
4040
// Not -inf
4141
if x != f64::INFINITY && x != fn_test_not_inf() {}
4242
const X: f64 = 1.0f64;
43-
// Will be linted if `const_float_classify` is enabled
4443
if const { X == f64::INFINITY || X == f64::NEG_INFINITY } {}
4544
if const { X != f64::INFINITY && X != f64::NEG_INFINITY } {}
4645
external! {

0 commit comments

Comments
 (0)