Skip to content

Commit c4d3570

Browse files
committed
stabilize cfg_select!
1 parent 5bc3450 commit c4d3570

File tree

17 files changed

+16
-32
lines changed

17 files changed

+16
-32
lines changed

compiler/rustc_data_structures/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
#![allow(rustc::default_hash_types)]
1212
#![allow(rustc::potential_query_instability)]
1313
#![cfg_attr(bootstrap, feature(array_windows))]
14+
#![cfg_attr(bootstrap, feature(cfg_select))]
1415
#![deny(unsafe_op_in_unsafe_fn)]
1516
#![feature(allocator_api)]
1617
#![feature(ascii_char)]
1718
#![feature(ascii_char_variants)]
1819
#![feature(assert_matches)]
1920
#![feature(auto_traits)]
20-
#![feature(cfg_select)]
2121
#![feature(core_intrinsics)]
2222
#![feature(dropck_eyepatch)]
2323
#![feature(extend_one)]

compiler/rustc_span/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
// tidy-alphabetical-start
1919
#![allow(internal_features)]
2020
#![cfg_attr(bootstrap, feature(array_windows))]
21+
#![cfg_attr(bootstrap, feature(cfg_select))]
2122
#![cfg_attr(target_arch = "loongarch64", feature(stdarch_loongarch))]
22-
#![feature(cfg_select)]
2323
#![feature(core_io_borrowed_buf)]
2424
#![feature(if_let_guard)]
2525
#![feature(map_try_insert)]

library/core/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@
100100
#![feature(bigint_helper_methods)]
101101
#![feature(bstr)]
102102
#![feature(bstr_internals)]
103-
#![feature(cfg_select)]
104103
#![feature(cfg_target_has_reliable_f16_f128)]
105104
#![feature(const_carrying_mul_add)]
106105
#![feature(const_cmp)]
@@ -247,7 +246,7 @@ pub mod autodiff {
247246
#[unstable(feature = "contracts", issue = "128044")]
248247
pub mod contracts;
249248

250-
#[unstable(feature = "cfg_select", issue = "115585")]
249+
#[stable(feature = "cfg_select", since = "CURRENT_RUSTC_VERSION")]
251250
pub use crate::macros::cfg_select;
252251

253252
#[macro_use]

library/core/src/macros/mod.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,6 @@ pub macro assert_matches {
208208
/// # Example
209209
///
210210
/// ```
211-
/// #![feature(cfg_select)]
212-
///
213211
/// cfg_select! {
214212
/// unix => {
215213
/// fn foo() { /* unix specific functionality */ }
@@ -227,14 +225,12 @@ pub macro assert_matches {
227225
/// right-hand side:
228226
///
229227
/// ```
230-
/// #![feature(cfg_select)]
231-
///
232228
/// let _some_string = cfg_select! {
233229
/// unix => "With great power comes great electricity bills",
234230
/// _ => { "Behind every successful diet is an unwatched pizza" }
235231
/// };
236232
/// ```
237-
#[unstable(feature = "cfg_select", issue = "115585")]
233+
#[stable(feature = "cfg_select", since = "CURRENT_RUSTC_VERSION")]
238234
#[rustc_diagnostic_item = "cfg_select"]
239235
#[rustc_builtin_macro]
240236
pub macro cfg_select($($tt:tt)*) {

library/coretests/tests/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// tidy-alphabetical-start
22
#![cfg_attr(target_has_atomic = "128", feature(integer_atomics))]
3-
#![cfg_attr(test, feature(cfg_select))]
43
#![feature(alloc_layout_extra)]
54
#![feature(array_ptr_get)]
65
#![feature(array_try_from_fn)]

library/panic_unwind/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#![unstable(feature = "panic_unwind", issue = "32837")]
1616
#![doc(issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/")]
1717
#![feature(cfg_emscripten_wasm_eh)]
18-
#![feature(cfg_select)]
1918
#![feature(core_intrinsics)]
2019
#![feature(lang_items)]
2120
#![feature(panic_unwind)]

library/std/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,6 @@
319319
#![feature(bstr)]
320320
#![feature(bstr_internals)]
321321
#![feature(cast_maybe_uninit)]
322-
#![feature(cfg_select)]
323322
#![feature(char_internals)]
324323
#![feature(clone_to_uninit)]
325324
#![feature(const_convert)]
@@ -695,7 +694,7 @@ mod panicking;
695694
#[allow(dead_code, unused_attributes, fuzzy_provenance_casts, unsafe_op_in_unsafe_fn)]
696695
mod backtrace_rs;
697696

698-
#[unstable(feature = "cfg_select", issue = "115585")]
697+
#[stable(feature = "cfg_select", since = "CURRENT_RUSTC_VERSION")]
699698
pub use core::cfg_select;
700699
#[unstable(
701700
feature = "concat_bytes",

library/std/tests/env_modify.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// These tests are in a separate integration test as they modify the environment,
22
// and would otherwise cause some other tests to fail.
3-
#![feature(cfg_select)]
43

54
use std::env::*;
65
use std::ffi::{OsStr, OsString};

library/std_detect/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
//! * `s390x`: [`is_s390x_feature_detected`]
1616
1717
#![unstable(feature = "stdarch_internal", issue = "none")]
18-
#![feature(staged_api, cfg_select, doc_cfg, allow_internal_unstable)]
18+
#![feature(staged_api, doc_cfg, allow_internal_unstable)]
1919
#![deny(rust_2018_idioms)]
2020
#![allow(clippy::shadow_reuse)]
2121
#![cfg_attr(test, allow(unused_imports))]

library/unwind/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#![no_std]
22
#![unstable(feature = "panic_unwind", issue = "32837")]
33
#![feature(cfg_emscripten_wasm_eh)]
4-
#![feature(cfg_select)]
54
#![feature(link_cfg)]
65
#![feature(staged_api)]
76
#![cfg_attr(not(target_env = "msvc"), feature(libc))]

0 commit comments

Comments
 (0)