Skip to content

Commit 043a987

Browse files
committed
Remove set! macro.
It has a single call site.
1 parent 53fe37d commit 043a987

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

compiler/rustc_feature/src/active.rs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,6 @@ use rustc_span::edition::Edition;
77
use rustc_span::symbol::{sym, Symbol};
88
use rustc_span::Span;
99

10-
macro_rules! set {
11-
($field: ident) => {{
12-
fn f(features: &mut Features) {
13-
features.$field = true;
14-
}
15-
f as fn(&mut Features)
16-
}};
17-
}
18-
1910
#[derive(PartialEq)]
2011
enum FeatureStatus {
2112
Default,
@@ -43,7 +34,15 @@ macro_rules! declare_features {
4334
&[$(
4435
// (sym::$feature, $ver, $issue, $edition, set!($feature))
4536
Feature {
46-
state: State::Active { set: set!($feature) },
37+
state: State::Active {
38+
// Sets this feature's corresponding bool within `features`.
39+
set: {
40+
fn f(features: &mut Features) {
41+
features.$feature = true;
42+
}
43+
f as fn(&mut Features)
44+
}
45+
},
4746
name: sym::$feature,
4847
since: $ver,
4948
issue: to_nonzero($issue),

0 commit comments

Comments
 (0)