Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add symbol-addition to the how-to for new features #1457

Merged
merged 2 commits into from
Sep 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 3 additions & 1 deletion src/feature-gates.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ 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 a feature gate declaration to `rustc_feature/src/active.rs` in the active
First, add the feature name to `rustc_span/src/symbol.rs` in the `Symbols {...}` block.

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

```rust,ignore
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