From 81d1f7ea9d86490de2920d7b726db412c21de005 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 5 Oct 2023 19:56:19 +1100 Subject: [PATCH] Use a closure when setting `State::Active`. --- compiler/rustc_feature/src/active.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs index abfaef8b0ff23..83961647bd442 100644 --- a/compiler/rustc_feature/src/active.rs +++ b/compiler/rustc_feature/src/active.rs @@ -39,12 +39,7 @@ macro_rules! declare_features { Feature { state: State::Active { // Sets this feature's corresponding bool within `features`. - set: { - fn f(features: &mut Features) { - features.$feature = true; - } - f as fn(&mut Features) - } + set: |features| features.$feature = true, }, name: sym::$feature, since: $ver,