From 01b909174bf44b72b927b524626b06738e5872a4 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 15 Oct 2023 12:53:37 -0700 Subject: [PATCH] Fix stable feature names in tests --- .../tests/ui/missing_const_for_fn/auxiliary/helper.rs | 4 ++-- tests/rustdoc/deprecated-future-staged-api.rs | 6 +++--- tests/ui/deprecation/staged-deprecation-in-future.rs | 6 +++--- tests/ui/repr/16-bit-repr-c-enum.rs | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/tools/clippy/tests/ui/missing_const_for_fn/auxiliary/helper.rs b/src/tools/clippy/tests/ui/missing_const_for_fn/auxiliary/helper.rs index 7b9dc76b8f1..775e071147c 100644 --- a/src/tools/clippy/tests/ui/missing_const_for_fn/auxiliary/helper.rs +++ b/src/tools/clippy/tests/ui/missing_const_for_fn/auxiliary/helper.rs @@ -1,8 +1,8 @@ // This file provides a const function that is unstably const forever. #![feature(staged_api)] -#![stable(feature = "1", since = "1.0.0")] +#![stable(feature = "clippytest", since = "1.0.0")] -#[stable(feature = "1", since = "1.0.0")] +#[stable(feature = "clippytest", since = "1.0.0")] #[rustc_const_unstable(feature = "foo", issue = "none")] pub const fn unstably_const_fn() {} diff --git a/tests/rustdoc/deprecated-future-staged-api.rs b/tests/rustdoc/deprecated-future-staged-api.rs index 2670e7f5d04..09120b8d411 100644 --- a/tests/rustdoc/deprecated-future-staged-api.rs +++ b/tests/rustdoc/deprecated-future-staged-api.rs @@ -1,12 +1,12 @@ #![feature(staged_api)] -#![stable(feature = "deprecated-future-staged-api", since = "1.0.0")] +#![stable(feature = "deprecated_future_staged_api", since = "1.0.0")] // @has deprecated_future_staged_api/index.html '//*[@class="stab deprecated"]' \ // 'Deprecation planned' // @has deprecated_future_staged_api/struct.S1.html '//*[@class="stab deprecated"]' \ // 'Deprecating in 99.99.99: effectively never' #[deprecated(since = "99.99.99", note = "effectively never")] -#[stable(feature = "deprecated-future-staged-api", since = "1.0.0")] +#[stable(feature = "deprecated_future_staged_api", since = "1.0.0")] pub struct S1; // @has deprecated_future_staged_api/index.html '//*[@class="stab deprecated"]' \ @@ -14,5 +14,5 @@ pub struct S1; // @has deprecated_future_staged_api/struct.S2.html '//*[@class="stab deprecated"]' \ // 'Deprecating in a future Rust version: literally never' #[deprecated(since = "TBD", note = "literally never")] -#[stable(feature = "deprecated-future-staged-api", since = "1.0.0")] +#[stable(feature = "deprecated_future_staged_api", since = "1.0.0")] pub struct S2; diff --git a/tests/ui/deprecation/staged-deprecation-in-future.rs b/tests/ui/deprecation/staged-deprecation-in-future.rs index 87b15ec303c..49ee60b9bd0 100644 --- a/tests/ui/deprecation/staged-deprecation-in-future.rs +++ b/tests/ui/deprecation/staged-deprecation-in-future.rs @@ -2,14 +2,14 @@ #![feature(staged_api)] -#![stable(feature = "rustc_deprecation-in-future-test", since = "1.0.0")] +#![stable(feature = "rustc_deprecation_in_future_test", since = "1.0.0")] #[deprecated(since = "99.99.99", note = "effectively never")] -#[stable(feature = "rustc_deprecation-in-future-test", since = "1.0.0")] +#[stable(feature = "rustc_deprecation_in_future_test", since = "1.0.0")] pub struct S1; #[deprecated(since = "TBD", note = "literally never")] -#[stable(feature = "rustc_deprecation-in-future-test", since = "1.0.0")] +#[stable(feature = "rustc_deprecation_in_future_test", since = "1.0.0")] pub struct S2; fn main() { diff --git a/tests/ui/repr/16-bit-repr-c-enum.rs b/tests/ui/repr/16-bit-repr-c-enum.rs index d4fea2b192b..c6d188d63e6 100644 --- a/tests/ui/repr/16-bit-repr-c-enum.rs +++ b/tests/ui/repr/16-bit-repr-c-enum.rs @@ -8,7 +8,7 @@ #![feature(no_core, lang_items, intrinsics, staged_api, rustc_attrs)] #![no_core] #![crate_type = "lib"] -#![stable(feature = "", since = "")] +#![stable(feature = "intrinsics_for_test", since = "")] #![allow(dead_code)] // Test that the repr(C) attribute doesn't break compilation @@ -22,8 +22,8 @@ enum Foo { } extern "rust-intrinsic" { - #[stable(feature = "", since = "")] - #[rustc_const_stable(feature = "", since = "")] + #[stable(feature = "intrinsics_for_test", since = "")] + #[rustc_const_stable(feature = "intrinsics_for_test", since = "")] #[rustc_safe_intrinsic] fn size_of() -> usize; }