Skip to content

Commit 14645f0

Browse files
committed
Revise the stabilization process changes
This PR contains a number of changes to better describe our stabilization process and policies. Let's revise this a bit, editorially, to better describe some of the nuances in our process, and to capture some additional details we want people to speak to in their stabilization reports.
1 parent 7847bb8 commit 14645f0

File tree

3 files changed

+105
-55
lines changed

3 files changed

+105
-55
lines changed

src/implementing_new_features.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -209,33 +209,33 @@ tests/ui/feature-gates/ --bless`.
209209

210210
## Call for testing
211211

212-
Once the implementation is complete, the feature will be available to nightly users, but not yet part of stable Rust. This is a good time to write a blog post on [the main Rust blog][rust-blog] and issue a **Call for Testing**.
212+
Once the implementation is complete, the feature will be available to nightly users but not yet part of stable Rust. This is a good time to write a blog post on [the main Rust blog][rust-blog] and issue a "call for testing".
213213

214-
Some example Call for Testing blog posts:
214+
Some earlier such blog posts include:
215215

216216
1. [The push for GATs stabilization](https://blog.rust-lang.org/2021/08/03/GATs-stabilization-push/)
217217
2. [Changes to `impl Trait` in Rust 2024](https://blog.rust-lang.org/2024/09/05/impl-trait-capture-rules.html)
218218
3. [Async Closures MVP: Call for Testing!](https://blog.rust-lang.org/inside-rust/2024/08/09/async-closures-call-for-testing/)
219219

220-
Alternatively, [*This Week in Rust*][twir] has a [call-for-testing section][twir-cft]. Example:
220+
Alternatively, [*This Week in Rust*][twir] has a [section][twir-cft] for this. One example of this having been used is:
221221

222-
- [Call for testing on boolean literals as cfg predicates](https://github.com/rust-lang/rust/issues/131204#issuecomment-2569314526).
222+
- [Call for testing on boolean literals as cfg predicates](https://github.com/rust-lang/rust/issues/131204#issuecomment-2569314526)
223223

224-
Which option to choose might depend on how significant the language change is, though note that [*This Week in Rust*][twir]'s Call for Testing section might be less visible than a dedicated post on the main Rust blog.
224+
Which option to choose might depend on how significant the language change is, though note that the [*This Week in Rust*][twir] section might be less visible than a dedicated post on the main Rust blog.
225225

226226
## Affiliated work
227227

228-
Once the feature is supported by rustc, there is other associated work that needs to be done to give users a complete experience. Think of it as the *language toolchain* developer experience, which doesn't only comprise of the language or compiler in isolation.
228+
Once the feature is supported by rustc, there is other associated work that needs to be done to give users a polished experience when using all of the tools we ship.
229229

230230
- Documenting the language feature in the [Rust Reference][reference].
231-
- (If applicable) Extending [`rustfmt`] to format any new syntax.
232-
- (If applicable) Extending [`rust-analyzer`]. This can depend on the nature of the language feature, as some features don't need to be blocked on *full* support.
233-
- A blocking concern is when a language feature degrades the user experience simply by existing before its support is implemented in [`rust-analyzer`].
234-
- Example blocking concern: new syntax that [`rust-analyzer`] can't parse -> bogus diagnostics, type inference changes -> bogus diagnostics.
231+
- Extending [`rustfmt`] to format any new syntax (if applicable).
232+
- Extending [`rust-analyzer`] (if applicable). The extent of this work can depend on the nature of the language feature, as some features don't need to be blocked on *full* support.
233+
- When a language feature degrades the user experience simply by existing before support is implemented in [`rust-analyzer`], that may lead the lang team to raise a blocking concern.
234+
- Examples of such might include new syntax that [`rust-analyzer`] can't parse or type inference changes it doesn't understand when those lead to bogus diagnostics.
235235

236236
## Stabilization
237237

238-
The final step in the feature lifecycle is [stabilization][stab], which is when the feature becomes available to all Rust users. At this point, backwards incompatible changes are no longer permitted (modulo soundness bugs and inference changes; see the lang team's [defined semver policies](https://rust-lang.github.io/rfcs/1122-language-semver.html) for full details). To learn more about stabilization, see the [stabilization guide][stab].
238+
The final step in the feature lifecycle is [stabilization][stab], which is when the feature becomes available to all Rust users. At this point, backward incompatible changes are generally no longer permitted (see the lang team's [defined semver policies](https://rust-lang.github.io/rfcs/1122-language-semver.html) for details). To learn more about stabilization, see the [stabilization guide][stab].
239239

240240

241241
[stab]: ./stabilization_guide.md

src/stabilization_guide.md

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -47,27 +47,23 @@ Author a stabilization report using the [template found in this repository][srt]
4747

4848
Stabilization reports summarize:
4949

50-
- The main design decisions and deviations since the RFC was accepted, particularly decisions that were FCP'd or otherwise accepted by the language team.
51-
- Quite often, the final stabilized language feature can have significant design deviations from the original RFC text.
50+
- The main design decisions and deviations since the RFC was accepted, including both decisions that were FCP'd or otherwise accepted by the language team as well as those being presented to the lang team for the first time.
51+
- Quite often, the final stabilized language feature can have significant design deviations from the original RFC text. That's OK, but these deviations must be highlighted and explained carefully.
5252
- The work that has been done since the RFC was accepted, acknowledging the main contributors that helped drive the language feature forward.
5353

54-
The [*Stabilization Template*][srt] includes a series of questions that aim to surface interconnections between this feature and the various Rust teams (lang, types, etc) and also to identify items that are commonly overlooked.
54+
The [*Stabilization Template*][srt] includes a series of questions that aim to surface connections between this feature and lang's subteams (e.g. types, opsem, lang-docs, etc.) and to identify items that are commonly overlooked.
5555

5656
[srt]: ./stabilization_report_template.md
5757

5858
The stabilization report is typically posted as the main comment on the stabilization PR (see the next section).
5959

6060
## Stabilization PR for a language feature
6161

62-
*This is for stabilizing language features. If you are stabilizing a library
63-
feature, see [the stabilization chapter of the std dev guide][std-guide-stabilization] instead.*
62+
*This is for stabilizing language features. If you are stabilizing a library feature, see [the stabilization chapter of the std dev guide][std-guide-stabilization] instead.*
6463

65-
Here is a general guide to how to stabilize a feature --
66-
every feature is different, of course, so some features may
67-
require steps beyond what this guide talks about.
64+
Here is a general guide to how to stabilize a feature -- every feature is different, of course, so some features may require steps beyond what this guide discusses.
6865

69-
Note: Before we stabilize any feature, it's the rule that it
70-
should appear in the documentation.
66+
Note: Before the stabilization will be considered by the lang team, there must be a complete PR to the Reference describing the feature, and before the stabilization PR will be merged, this PR must have been reviewed and accepted by the lang-docs team.
7167

7268
### Updating the feature-gate listing
7369

@@ -166,22 +162,24 @@ if something { /* XXX */ }
166162

167163
## Team nominations
168164

169-
After the stabilization PR is opened with the stabilization report, wait a bit for potential immediate comments. When such immediate comments "simmer down" and you feel the PR is ready for consideration by the lang team, you can [nominate the PR](https://lang-team.rust-lang.org/how_to/nominate.html) to get it on the list for discussion in the next meeting. You should also cc the other interacting teams when applicable to review the language feature being stabilized and the stabilization report:
165+
When opening the stabilization PR, CC the lang team (`@rust-lang/lang`) and any other teams to whom the feature is relevant, e.g.:
170166

171-
* `@rust-lang/types`, to look for type system interactions
172-
* `@rust-lang/compiler`, to review implementation robustness
173-
* `@rust-lang/opsem`, if this feature interacts with unsafe code and can create undefined behavior
174-
* `@rust-lang/libs-api`, if there are additions to the standard library that affects standard library API or their guarantees
167+
- `@rust-lang/types`, for type system interactions.
168+
- `@rust-lang/compiler`, for implementation robustness.
169+
- `@rust-lang/opsem`, for interactions with unsafe code.
170+
- `@rust-lang/libs-api`, for changes to the standard library API or its guarantees.
171+
- `@rust-lang/lang-docs`, for questions about how this should be documented in the Reference.
175172

176-
If you are not an organization member, you can simply ask your assigned reviewer to cc the relevant teams on your behalf.
173+
After the stabilization PR is opened with the stabilization report, wait a bit for any immediate comments. When such comments "simmer down" and you feel the PR is ready for consideration by the lang team, [nominate the PR](https://lang-team.rust-lang.org/how_to/nominate.html) to get it on the agenda for consideration in an upcoming lang meeting.
174+
175+
If you are not a `rust-lang` organization member, you can ask your assigned reviewer to CC the relevant teams on your behalf.
177176

178177
## FCP proposed on the PR
179178

180-
Finally, some member of the team responsible for tracking this feature agrees with stabilizing this feature, will
181-
start the FCP (final-comment-period) process by commenting
179+
After the lang team and other relevant teams review the stabilization, and after you have answered any questions they may have had, a member of one of the teams may propose to accept the stabilization by commenting:
182180

183181
```text
184182
@rfcbot fcp merge
185183
```
186184

187-
The rest of the team members will review the proposal. If the final decision is to stabilize, the PR will be reviewed by the compiler team like any other PR.
185+
Once enough team members have reviewed, the PR will move into a "final comment period". After this period, if no new concerns have been raised, the PR can be merged after implementation review in the usual way.

src/stabilization_report_template.md

Lines changed: 77 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,63 @@
22

33
> **What is this?**
44
>
5-
> This is a template to use for [stabilization reports](./stabilization_guide.md) of **language features**. It consists of a series of questions that aim to provide the information most commonly needed and to help reviewers be more likely to identify potential problems up front. Not all parts of the template will apply to all stabilizations. Feel free to put N/A if a question doesn't seem to apply to your case.
5+
> This is a template to use for [stabilization reports](./stabilization_guide.md) of **language features**. It consists of a series of questions that aim to provide the information most commonly needed. This helps reviewers to identify potential problems up front. Not all parts of the template will apply to every stabilizations. Put N/A if a question doesn't apply.
66
>
7-
> You can copy the following template after the separator and edit it as Markdown, replacing the *TODO* placeholders with answers.
7+
> Copy the following template after the separator and edit it as Markdown. Replace each *TODO* with answers.
88
99
---
1010

1111
> ## General design
12+
>
13+
> ### What is the RFC for this feature?
1214
13-
> ### What is the RFC for this feature and what changes have occurred to the user-facing design since the RFC was finalized?
15+
*TODO*
16+
17+
> ### Post-RFC changes
18+
>
19+
> What user-visible changes have occurred since the RFC was accepted?
1420
1521
*TODO*
1622

17-
> ### What behavior are we committing to that has been controversial? Summarize the major arguments pro/con.
23+
> ### Key points
24+
>
25+
> What behaviors to be stabilized have been most controversial? Summarize the major arguments on all sides.
1826
1927
*TODO*
2028

21-
> ### Are there extensions to this feature that remain unstable? How do we know that we are not accidentally committing to those?
29+
> ### Nightly extensions
30+
>
31+
> Are there extensions to this feature that remain unstable? How do we know that we are not accidentally committing to those?
2232
2333
*TODO*
2434

25-
> ## Has a Call for Testing period been conducted? If so, what feedback was received?
35+
> ## Feedback
2636
>
27-
> Does any OSS nightly users use this feature? For instance, a useful indication might be "search <grep.app> for `#![feature(FEATURE_NAME)]` and had `N` results".
37+
> ### Call for testing
38+
>
39+
> Has a "call for testing" been done? If so, what feedback was received?
2840
2941
*TODO*
3042

31-
> ## Implementation quality
43+
> ### Nightly use
44+
>
45+
> Does any OSS nightly users use this feature? For instance, a useful indication might be "search <grep.app> for `#![feature(FEATURE_NAME)]` and had `N` results".
3246
3347
*TODO*
3448

35-
> ### Summarize the major parts of the implementation and provide links into the code (or to PRs)
49+
> ## Implementation quality
50+
>
51+
> ### Major parts
52+
>
53+
> Summarize the major parts of the implementation and provide links into the code (or to PRs).
3654
>
3755
> An example for async closures: <https://rustc-dev-guide.rust-lang.org/coroutine-closures.html>.
3856
3957
*TODO*
4058

41-
> ### Summarize existing test coverage of this feature
59+
> ### Coverage
60+
>
61+
> Summarize existing test coverage of this feature.
4262
>
4363
> Consider what the "edges" of this feature are. We're particularly interested in seeing tests that assure us about exactly what nearby things we're not stabilizing.
4464
>
@@ -56,50 +76,82 @@
5676
5777
*TODO*
5878

59-
> ### What outstanding bugs in the issue tracker involve this feature? Are they stabilization-blocking?
79+
> ### Outstanding bugs
80+
>
81+
> What outstanding bugs in the issue tracker involve this feature? Are they stabilization-blocking?
6082
6183
*TODO*
6284

63-
> ### What FIXMEs are still in the code for that feature and why is it ok to leave them there?
85+
> ### Outstanding FIXMEs
86+
>
87+
> What FIXMEs are still in the code for that feature and why is it ok to leave them there?
6488
6589
*TODO*
6690

67-
> ### Summarize contributors to the feature by name for recognition and assuredness that people involved in the feature agree with stabilization
91+
> ### Contributors
92+
>
93+
> Summarize contributors to the feature by name for recognition and assuredness that people involved in the feature agree with stabilization.
6894
6995
*TODO*
7096

71-
> ### Which tools need to be adjusted to support this feature. Has this work been done?
72-
>
73-
> Consider rustdoc, clippy, rust-analyzer, rustfmt, rustup, docs.rs.
97+
> ### Tool changes
98+
>
99+
> Which tools need to be adjusted to support this feature. Has this work been done?
100+
>
101+
> Consider rustdoc (both JSON and HTML), clippy, rust-analyzer, rustfmt, rustup, docs.rs.
74102
75103
*TODO*
76104

77105
> ## Type system and execution rules
78106
79-
> ### What compilation-time checks are done that are needed to prevent undefined behavior?
80-
>
81-
> (Be sure to link to tests demonstrating that these tests are being done.)
107+
> ### Compile-time checks
108+
>
109+
> What compilation-time checks are done that are needed to prevent undefined behavior?
110+
>
111+
> (Be sure to link to tests demonstrating that these tests are being done.)
82112
83113
*TODO*
84114

85-
> ### Does the feature's implementation need checks to prevent UB or is it sound by default and needs opt in in places to perform the dangerous/unsafe operations? If it is not sound by default, what is the rationale?
115+
> ### Sound by default?
116+
>
117+
> Does the feature's implementation need checks to prevent UB or is it sound by default and needs opt in in places to perform the dangerous/unsafe operations? If it is not sound by default, what is the rationale?
86118
87119
*TODO*
88120

89-
> ### Can users use this feature to introduce undefined behavior, or use this feature to break the abstraction of Rust and expose the underlying assembly-level implementation? (Describe.)
121+
> ### Breaks the AM?
122+
>
123+
> Can users use this feature to introduce undefined behavior, or use this feature to break the abstraction of Rust and expose the underlying assembly-level implementation? (Describe.)
90124
91125
*TODO*
92126

93-
> ### What updates are needed to the reference/specification? (link to PRs when they exist)
127+
> ### Reference
128+
>
129+
> What updates are needed to the Reference? Link to each PR.
94130
95-
*TODO*
131+
- *TODO*
96132

97133
> ## Common interactions
134+
>
135+
> ### Temporaries
136+
>
137+
> Does this feature introduce new expressions that can produce temporaries? What are the lifetimes of those temporaries?
98138
99-
> ### Does this feature introduce new expressions and can they produce temporaries? What are the lifetimes of those temporaries?
139+
*TODO*
140+
141+
> ### Pre-expansion / post-expansion
142+
>
143+
> Does this feature raise questions about what should be accepted pre-expansion (e.g. in code covered by `#[cfg(false)]`) versus what should be accepted post-expansion? What decisions were made about this?
100144
101145
*TODO*
102146

103-
> ### What other unstable features may be exposed by this feature?
147+
> ### SemVer implications
148+
>
149+
> Does this feature create any new ways in which library authors must take care to prevent breaking their downstreams when making minor-version releases? Describe these. Are these new hazards "major" or "minor" according to [RFC 1105](https://rust-lang.github.io/rfcs/1105-api-evolution.html)?
150+
151+
*TODO*
152+
153+
> ### Exposing other features
154+
>
155+
> Are there any other unstable features whose behavior may be exposed by this feature in any way? What features present the highest risk of that?
104156
105157
*TODO*

0 commit comments

Comments
 (0)