1
Fork 0

replaces few consts with statics to reduce readonly section

This commit is contained in:
klensy 2025-01-28 17:38:22 +03:00
parent 633a3fe36d
commit dc62b8fd11
7 changed files with 15 additions and 15 deletions

View file

@ -9,7 +9,7 @@ macro_rules! declare_features {
$(#[doc = $doc:tt])* (accepted, $feature:ident, $ver:expr, $issue:expr),
)+) => {
/// Formerly unstable features that have now been accepted (stabilized).
pub const ACCEPTED_LANG_FEATURES: &[Feature] = &[
pub static ACCEPTED_LANG_FEATURES: &[Feature] = &[
$(Feature {
name: sym::$feature,
since: $ver,

View file

@ -317,7 +317,7 @@ pub struct BuiltinAttribute {
/// Attributes that have a special meaning to rustc or rustdoc.
#[rustfmt::skip]
pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
pub static BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
// ==========================================================================
// Stable attributes:
// ==========================================================================

View file

@ -14,7 +14,7 @@ macro_rules! declare_features {
$(#[doc = $doc:tt])* (removed, $feature:ident, $ver:expr, $issue:expr, $reason:expr),
)+) => {
/// Formerly unstable features that have now been removed.
pub const REMOVED_LANG_FEATURES: &[RemovedFeature] = &[
pub static REMOVED_LANG_FEATURES: &[RemovedFeature] = &[
$(RemovedFeature {
feature: Feature {
name: sym::$feature,

View file

@ -104,7 +104,7 @@ macro_rules! declare_features {
)+) => {
/// Unstable language features that are being implemented or being
/// considered for acceptance (stabilization) or removal.
pub const UNSTABLE_LANG_FEATURES: &[Feature] = &[
pub static UNSTABLE_LANG_FEATURES: &[Feature] = &[
$(Feature {
name: sym::$feature,
since: $ver,