Skip to content

Commit a2fda4a

Browse files
committed
some text improvements
1 parent aad5a60 commit a2fda4a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/stabilization_guide.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Places that may need updated documentation include:
2929
If you're not sure, please open an issue on this repository and it can be discussed.
3030
- Standard library documentation: This is updated as needed.
3131
Language features often don't need this, but if it's a feature that changes how idiomatic examples are written, such as when `?` was added to the language, updating these in the library documentation is important.
32-
Review also the keyword documentation and ABI documentation in the standard library, as these sometimes needs updates for language changes.
32+
Review also the keyword documentation and ABI documentation in the standard library, as these sometimes need updates for language changes.
3333
- [Rust by Example]: This is updated as needed.
3434

3535
Prepare PRs to update documentation involving this new feature for the repositories mentioned above.
@@ -63,7 +63,8 @@ Before the stabilization will be considered by the lang team, there must be a co
6363

6464
There is a central listing of unstable feature-gates in [`compiler/rustc_feature/src/unstable.rs`].
6565
Search for the `declare_features!` macro.
66-
There should be an entry for the feature you are aiming to stabilize, something like (this example is taken from [rust-lang/rust#32409]:
66+
There should be an entry for the feature you are aiming to stabilize,
67+
something like the following (taken from [rust-lang/rust#32409]:
6768

6869
```rust,ignore
6970
// pub(restricted) visibilities (RFC 1422)
@@ -85,7 +86,9 @@ When it is done, it should look like:
8586
### Removing existing uses of the feature-gate
8687

8788
Next, search for the feature string (in this case, `pub_restricted`) in the codebase to find where it appears.
88-
Change uses of `#![feature(XXX)]` from the `std` and any rustc crates (this includes test folders under `library/` and `compiler/` but not the toplevel `tests/` one) to be `#![cfg_attr(bootstrap, feature(XXX))]`.
89+
Change uses of `#![feature(XXX)]` from the `std` and any rustc crates
90+
(which includes test folders under `library/` and `compiler/` but not the toplevel `tests/` one)
91+
to be `#![cfg_attr(bootstrap, feature(XXX))]`.
8992
This includes the feature-gate only for stage0, which is built using the current beta (this is needed because the feature is still unstable in the current beta).
9093

9194
Also, remove those strings from any tests (e.g. under `tests/`). If there are tests specifically targeting the feature-gate (i.e., testing that the feature-gate is required to use the feature, but nothing else), simply remove the test.
@@ -110,7 +113,7 @@ if self.tcx.features().async_fn_in_dyn_trait() { /* XXX */ }
110113
```
111114

112115
This `pub_restricted` field (named after the feature) would ordinarily be false if the feature flag is not present and true if it is.
113-
So transform the code to assume that the field is true.
116+
So, transform the code to assume that the field is true.
114117
In this case, that would mean removing the `if` and leaving just the `/* XXX */`.
115118

116119
```rust,ignore

0 commit comments

Comments
 (0)