Skip to content

Commit

Permalink
Update name of "active" features to "unstable"
Browse files Browse the repository at this point in the history
The name for active features was changed to unstable in
rust-lang/rust#116550
  • Loading branch information
nicholasbishop committed Oct 29, 2023
1 parent b0ee9ec commit b3c278e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/feature-gates.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ See ["Stability in code"][adding] in the "Implementing new features" section for

To remove a feature gate, follow these steps:

1. Remove the feature gate declaration in `rustc_feature/src/active.rs`.
1. Remove the feature gate declaration in `rustc_feature/src/unstable.rs`.
It will look like this:

```rust,ignore
/// description of feature
(active, $feature_name, "$version", Some($tracking_issue_number), $edition)
(unstable, $feature_name, "$version", Some($tracking_issue_number), $edition)
```

2. Add a modified version of the feature gate declaration that you just
Expand All @@ -45,12 +45,12 @@ To remove a feature gate, follow these steps:
To rename a feature gate, follow these steps (the first two are the same steps
to follow when [removing a feature gate][removing]):

1. Remove the old feature gate declaration in `rustc_feature/src/active.rs`.
1. Remove the old feature gate declaration in `rustc_feature/src/unstable.rs`.
It will look like this:

```rust,ignore
/// description of feature
(active, $old_feature_name, "$version", Some($tracking_issue_number), $edition)
(unstable, $old_feature_name, "$version", Some($tracking_issue_number), $edition)
```

2. Add a modified version of the old feature gate declaration that you just
Expand All @@ -64,12 +64,12 @@ to follow when [removing a feature gate][removing]):
```

3. Add a feature gate declaration with the new name to
`rustc_feature/src/active.rs`. It should look very similar to the old
`rustc_feature/src/unstable.rs`. It should look very similar to the old
declaration:

```rust,ignore
/// description of feature
(active, $new_feature_name, "$version", Some($tracking_issue_number), $edition)
(unstable, $new_feature_name, "$version", Some($tracking_issue_number), $edition)
```


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,12 +123,12 @@ a new unstable feature:

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

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

```rust ignore
/// description of feature
(active, $feature_name, "CURRENT_RUSTC_VERSION", Some($tracking_issue_number), $edition)
(unstable, $feature_name, "CURRENT_RUSTC_VERSION", Some($tracking_issue_number), $edition)
```

where `$edition` has the type `Option<Edition>`, and is typically just `None`. If you haven't yet
Expand All @@ -140,7 +140,7 @@ a new unstable feature:

```rust ignore
/// Allows defining identifiers beyond ASCII.
(active, non_ascii_idents, "CURRENT_RUSTC_VERSION", Some(55467), None),
(unstable, non_ascii_idents, "CURRENT_RUSTC_VERSION", Some(55467), None),
```

Features can be marked as incomplete, and trigger the warn-by-default [`incomplete_features`
Expand Down
2 changes: 1 addition & 1 deletion src/stabilization_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ to stabilize, something like (this example is taken from

```rust,ignore
// pub(restricted) visibilities (RFC 1422)
(active, pub_restricted, "CURRENT_RUSTC_VERSION", Some(32409)),
(unstable, pub_restricted, "CURRENT_RUSTC_VERSION", Some(32409)),
```

The above line should be moved down to the area for "accepted"
Expand Down

0 comments on commit b3c278e

Please sign in to comment.