Skip to content

Commit

Permalink
Use a closure when setting State::Active.
Browse files Browse the repository at this point in the history
  • Loading branch information
nnethercote committed Oct 5, 2023
1 parent 9d4e49b commit 81d1f7e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions compiler/rustc_feature/src/active.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 81d1f7e

Please sign in to comment.