Skip to content

Commit fc54bfa

Browse files
committed
Update the library stabilization guide to refer to the new placeholder system
1 parent a744e15 commit fc54bfa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/feature-lifecycle/stabilization.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ Library items are marked unstable via the `#[unstable]` attribute, like this:
6464
pub fn total_cmp(&self, other: &Self) -> crate::cmp::Ordering { ... }
6565
```
6666

67-
You'll need to change that to a `#[stable]` attribute with a version:
67+
You'll need to change that to a `#[stable]` attribute with the version set to the placeholder `CURRENT_RUSTC_VERSION`:
6868

6969
```rust,ignore
70-
#[stable(feature = "total_cmp", since = "1.61.0")]
70+
#[stable(feature = "total_cmp", since = "CURRENT_RUSTC_VERSION")]
7171
```
7272

73-
Note that, the version number is updated to be the version number of the stable release where this feature will appear. This can be found by consulting [`src/version`](https://github.com/rust-lang/rust/blob/master/src/version) on the current master branch of `rust-lang/rust`.
73+
Note that other `#[stable]` attributes will contain spelled out version numbers, but you should not spell out any version number as it might get outdated by the time your pull request merges.
7474

7575
### Remove feature gates from doctests
7676

0 commit comments

Comments
 (0)