Use a closure when setting State::Active.

This commit is contained in:
Nicholas Nethercote 2023-10-05 19:56:19 +11:00
parent 9d4e49b386
commit 81d1f7ea9d

View File

@ -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,