Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/feature-gates.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ modifying feature gates.
See ["Stability in code"] for help with adding a new feature; this section just
covers how to add the feature gate *declaration*.

Add the feature name to `rustc_span/src/symbol.rs` in the `Symbols {...}` block.

Add a feature gate declaration to `rustc_feature/src/active.rs` in the active
`declare_features` block:

Expand Down
6 changes: 3 additions & 3 deletions src/implementing_new_features.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ a new unstable feature:
2. Pick a name for the feature gate (for RFCs, use the name
in the RFC).

3. Add a feature gate declaration to `rustc_feature/src/active.rs`
in the active `declare_features` block. See [here][add-feature-gate] for
detailed instructions.
3. Add a feature gate declaration to `rustc_feature/src/active.rs` in the active
`declare_features` block, and add the feature gate keyword to
`rustc_span/src/symbol.rs`. See [here][add-feature-gate] for detailed instructions.

4. Prevent usage of the new feature unless the feature gate is set.
You can check it in most places in the compiler using the
Expand Down