Skip to content

Commit 369a2e9

Browse files
authored
Update stabilization_guide.md (#2034)
1 parent 4be2f54 commit 369a2e9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/stabilization_guide.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ should appear in the documentation.
101101

102102
### Updating the feature-gate listing
103103

104-
There is a central listing of feature-gates in
105-
[`compiler/rustc_feature`]. Search for the `declare_features!`
104+
There is a central listing of unstable feature-gates in
105+
[`compiler/rustc_feature/src/unstable.rs`]. Search for the `declare_features!`
106106
macro. There should be an entry for the feature you are aiming
107107
to stabilize, something like (this example is taken from
108108
[rust-lang/rust#32409]:
@@ -112,8 +112,8 @@ to stabilize, something like (this example is taken from
112112
(unstable, pub_restricted, "CURRENT_RUSTC_VERSION", Some(32409)),
113113
```
114114

115-
The above line should be moved down to the area for "accepted"
116-
features, declared below in a separate call to `declare_features!`.
115+
The above line should be moved to [`compiler/rustc_feature/src/accepted.rs`].
116+
Entries in the `declare_features!` call are sorted, so find the correct place.
117117
When it is done, it should look like:
118118

119119
```rust,ignore
@@ -131,12 +131,12 @@ but instead `CURRENT_RUSTC_VERSION`)
131131
Next search for the feature string (in this case, `pub_restricted`)
132132
in the codebase to find where it appears. Change uses of
133133
`#![feature(XXX)]` from the `std` and any rustc crates (this includes test folders
134-
under `library/` and `compiler/` but not the toplevel `test/` one) to be
134+
under `library/` and `compiler/` but not the toplevel `tests/` one) to be
135135
`#![cfg_attr(bootstrap, feature(XXX))]`. This includes the feature-gate
136136
only for stage0, which is built using the current beta (this is
137137
needed because the feature is still unstable in the current beta).
138138

139-
Also, remove those strings from any tests. If there are tests
139+
Also, remove those strings from any tests (e.g. under `tests/`). If there are tests
140140
specifically targeting the feature-gate (i.e., testing that the
141141
feature-gate is required to use the feature, but nothing else),
142142
simply remove the test.

0 commit comments

Comments
 (0)