Skip to content

Commit 2dd5369

Browse files
committed
clarify the meaning of the version number for accepted/removed features
1 parent c1e3f03 commit 2dd5369

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

compiler/rustc_feature/src/accepted.rs

+4
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ declare_features! (
4242
// feature-group-start: accepted features
4343
// -------------------------------------------------------------------------
4444

45+
// Note that the version indicates when it got *stabilized*.
46+
// When moving an unstable feature here, set the version number to
47+
// `CURRENT RUSTC VERSION` with ` ` replaced by `_`.
48+
4549
/// Allows `#[target_feature(...)]` on aarch64 platforms
4650
(accepted, aarch64_target_feature, "1.61.0", Some(44839)),
4751
/// Allows using the `efiapi` ABI.

compiler/rustc_feature/src/lib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ use std::num::NonZero;
3131
#[derive(Debug, Clone)]
3232
pub struct Feature {
3333
pub name: Symbol,
34+
/// For unstable features: the version the feature was added in.
35+
/// For accepted features: the version the feature got stabilized in.
36+
/// For removed features we are inconsistent; sometimes this is the
37+
/// version it got added, sometimes the version it got removed.
3438
pub since: &'static str,
3539
issue: Option<NonZero<u32>>,
3640
}

compiler/rustc_feature/src/removed.rs

+6
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ declare_features! (
3232
// feature-group-start: removed features
3333
// -------------------------------------------------------------------------
3434

35+
// Note that the version indicates when it got *removed*.
36+
// When moving an unstable feature here, set the version number to
37+
// `CURRENT RUSTC VERSION` with ` ` replaced by `_`.
38+
// (But not all features below do this properly; many indicate the
39+
// version they got originally added in.)
40+
3541
/// Allows using the `amdgpu-kernel` ABI.
3642
(removed, abi_amdgpu_kernel, "1.77.0", Some(51575), None),
3743
(removed, advanced_slice_patterns, "1.0.0", Some(62254),

0 commit comments

Comments
 (0)