Skip to content

Commit 010a9b1

Browse files
committed
Rename Features::active_features.
The word "active" is currently used in two different and confusing ways: - `ACTIVE_FEATURES` actually means "available unstable features" - `Features::active_features` actually means "features declared in the crate's code", which can include feature within `ACTIVE_FEATURES` but also others. (This is also distinct from "enabled" features which includes declared features but also some edition-specific features automatically enabled depending on the edition in use.) This commit changes the `Features::active_features` to `Features::declared_features` which actually matches its meaning. Likewise, `Features::active` becomes `Features::declared`.
1 parent f107a50 commit 010a9b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/manual_float_methods.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ impl<'tcx> LateLintPass<'tcx> for ManualFloatMethods {
8585
if !in_external_macro(cx.sess(), expr.span)
8686
&& (
8787
matches!(cx.tcx.constness(cx.tcx.hir().enclosing_body_owner(expr.hir_id)), Constness::NotConst)
88-
|| cx.tcx.features().active(sym!(const_float_classify))
88+
|| cx.tcx.features().declared(sym!(const_float_classify))
8989
) && let ExprKind::Binary(kind, lhs, rhs) = expr.kind
9090
&& let ExprKind::Binary(lhs_kind, lhs_lhs, lhs_rhs) = lhs.kind
9191
&& let ExprKind::Binary(rhs_kind, rhs_lhs, rhs_rhs) = rhs.kind

0 commit comments

Comments
 (0)