mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Use a closure when setting State::Active
.
This commit is contained in:
parent
9d4e49b386
commit
81d1f7ea9d
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user