Skip to content

Commit 81d1f7e

Browse files
committed
Use a closure when setting State::Active.
1 parent 9d4e49b commit 81d1f7e

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

compiler/rustc_feature/src/active.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,7 @@ macro_rules! declare_features {
3939
Feature {
4040
state: State::Active {
4141
// Sets this feature's corresponding bool within `features`.
42-
set: {
43-
fn f(features: &mut Features) {
44-
features.$feature = true;
45-
}
46-
f as fn(&mut Features)
47-
}
42+
set: |features| features.$feature = true,
4843
},
4944
name: sym::$feature,
5045
since: $ver,

0 commit comments

Comments
 (0)