Skip to content

Commit 3b4fe7e

Browse files
committed
Group and sort feature_gate.rs
1 parent 90d3fa2 commit 3b4fe7e

File tree

1 file changed

+22
-11
lines changed

1 file changed

+22
-11
lines changed

src/libsyntax/feature_gate.rs

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,14 @@ macro_rules! declare_features {
109109
// stable (active).
110110
//
111111
// Note that the features should be grouped into internal/user-facing
112-
// and then sorted by version inside those groups.
113-
// FIXME(60361): Enforce ^-- with tidy.
112+
// and then sorted by version inside those groups. This is inforced with tidy.
114113
//
115114
// N.B., `tools/tidy/src/features.rs` parses this information directly out of the
116115
// source, so take care when modifying it.
117116

118117
declare_features! (
119118
// -------------------------------------------------------------------------
120-
// Internal feature gates.
119+
// feature-group-start: internal feature gates
121120
// -------------------------------------------------------------------------
122121

123122
// no tracking issue START
@@ -211,12 +210,12 @@ declare_features! (
211210

212211
// no tracking issue END
213212

214-
// Allows using the `may_dangle` attribute (RFC 1327).
215-
(active, dropck_eyepatch, "1.10.0", Some(34761), None),
216-
217213
// Allows using `#[structural_match]` which indicates that a type is structurally matchable.
218214
(active, structural_match, "1.8.0", Some(31434), None),
219215

216+
// Allows using the `may_dangle` attribute (RFC 1327).
217+
(active, dropck_eyepatch, "1.10.0", Some(34761), None),
218+
220219
// Allows using the `#![panic_runtime]` attribute.
221220
(active, panic_runtime, "1.10.0", Some(32837), None),
222221

@@ -252,7 +251,11 @@ declare_features! (
252251
(active, test_2018_feature, "1.31.0", Some(0), Some(Edition::Edition2018)),
253252

254253
// -------------------------------------------------------------------------
255-
// Actual feature gates (target features).
254+
// feature-group-end: internal feature gates
255+
// -------------------------------------------------------------------------
256+
257+
// -------------------------------------------------------------------------
258+
// feature-group-start: actual feature gates (target features)
256259
// -------------------------------------------------------------------------
257260

258261
// FIXME: Document these and merge with the list below.
@@ -275,7 +278,11 @@ declare_features! (
275278
(active, f16c_target_feature, "1.36.0", Some(44839), None),
276279

277280
// -------------------------------------------------------------------------
278-
// Actual feature gates.
281+
// feature-group-end: actual feature gates (target features)
282+
// -------------------------------------------------------------------------
283+
284+
// -------------------------------------------------------------------------
285+
// feature-group-start: actual feature gates
279286
// -------------------------------------------------------------------------
280287

281288
// Allows using `asm!` macro with which inline assembly can be embedded.
@@ -340,9 +347,6 @@ declare_features! (
340347
// Permits specifying whether a function should permit unwinding or abort on unwind.
341348
(active, unwind_attributes, "1.4.0", Some(58760), None),
342349

343-
// Allows using `#[naked]` on functions.
344-
(active, naked_functions, "1.9.0", Some(32408), None),
345-
346350
// Allows `#[no_debug]`.
347351
(active, no_debug, "1.5.0", Some(29721), None),
348352

@@ -358,6 +362,9 @@ declare_features! (
358362
// Allows specialization of implementations (RFC 1210).
359363
(active, specialization, "1.7.0", Some(31844), None),
360364

365+
// Allows using `#[naked]` on functions.
366+
(active, naked_functions, "1.9.0", Some(32408), None),
367+
361368
// Allows `cfg(target_has_atomic = "...")`.
362369
(active, cfg_target_has_atomic, "1.9.0", Some(32976), None),
363370

@@ -545,6 +552,10 @@ declare_features! (
545552

546553
// Allows using C-variadics.
547554
(active, c_variadic, "1.34.0", Some(44930), None),
555+
556+
// -------------------------------------------------------------------------
557+
// feature-group-end: actual feature gates
558+
// -------------------------------------------------------------------------
548559
);
549560

550561
// Some features are known to be incomplete and using them is likely to have

0 commit comments

Comments
 (0)