Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clarify the meaning of the version number for accepted/removed features #127710

Merged
merged 1 commit into from
Jul 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions compiler/rustc_feature/src/accepted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ declare_features! (
// feature-group-start: accepted features
// -------------------------------------------------------------------------

// Note that the version indicates when it got *stabilized*.
// When moving an unstable feature here, set the version number to
// `CURRENT RUSTC VERSION` with ` ` replaced by `_`.

/// Allows `#[target_feature(...)]` on aarch64 platforms
(accepted, aarch64_target_feature, "1.61.0", Some(44839)),
/// Allows using the `efiapi` ABI.
Expand Down
4 changes: 4 additions & 0 deletions compiler/rustc_feature/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ use std::num::NonZero;
#[derive(Debug, Clone)]
pub struct Feature {
pub name: Symbol,
/// For unstable features: the version the feature was added in.
/// For accepted features: the version the feature got stabilized in.
/// For removed features we are inconsistent; sometimes this is the
/// version it got added, sometimes the version it got removed.
pub since: &'static str,
issue: Option<NonZero<u32>>,
}
Expand Down
6 changes: 6 additions & 0 deletions compiler/rustc_feature/src/removed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ declare_features! (
// feature-group-start: removed features
// -------------------------------------------------------------------------

// Note that the version indicates when it got *removed*.
// When moving an unstable feature here, set the version number to
// `CURRENT RUSTC VERSION` with ` ` replaced by `_`.
// (But not all features below do this properly; many indicate the
// version they got originally added in.)

/// Allows using the `amdgpu-kernel` ABI.
(removed, abi_amdgpu_kernel, "1.77.0", Some(51575), None),
(removed, advanced_slice_patterns, "1.0.0", Some(62254),
Expand Down
Loading