diff options
| author | Josh Stone <jistone@redhat.com> | 2025-06-24 10:05:56 -0700 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2025-07-01 10:55:49 -0700 |
| commit | e851e3e16e161e624b4108b83889b3fdbd5d44dd (patch) | |
| tree | 20302241c5875bac068af62ba935d81c7ee63df1 /compiler/rustc_data_structures | |
| parent | a58050b753387daee70cbf6c231ea1422dd74d47 (diff) | |
| download | rust-e851e3e16e161e624b4108b83889b3fdbd5d44dd.tar.gz rust-e851e3e16e161e624b4108b83889b3fdbd5d44dd.zip | |
Update `cfg(bootstrap)`
Diffstat (limited to 'compiler/rustc_data_structures')
| -rw-r--r-- | compiler/rustc_data_structures/src/aligned.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_data_structures/src/flock.rs | 13 | ||||
| -rw-r--r-- | compiler/rustc_data_structures/src/lib.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_data_structures/src/marker.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_data_structures/src/profiling.rs | 13 |
5 files changed, 6 insertions, 34 deletions
diff --git a/compiler/rustc_data_structures/src/aligned.rs b/compiler/rustc_data_structures/src/aligned.rs index 111740e5509..bfc7556faf6 100644 --- a/compiler/rustc_data_structures/src/aligned.rs +++ b/compiler/rustc_data_structures/src/aligned.rs @@ -1,7 +1,6 @@ +use std::marker::PointeeSized; use std::ptr::Alignment; -use rustc_serialize::PointeeSized; - /// Returns the ABI-required minimum alignment of a type in bytes. /// /// This is equivalent to [`align_of`], but also works for some unsized diff --git a/compiler/rustc_data_structures/src/flock.rs b/compiler/rustc_data_structures/src/flock.rs index 60ae7ad115a..f33f6b7cac1 100644 --- a/compiler/rustc_data_structures/src/flock.rs +++ b/compiler/rustc_data_structures/src/flock.rs @@ -4,18 +4,7 @@ //! green/native threading. This is just a bare-bones enough solution for //! librustdoc, it is not production quality at all. -// cfg(bootstrap) -macro_rules! cfg_select_dispatch { - ($($tokens:tt)*) => { - #[cfg(bootstrap)] - cfg_match! { $($tokens)* } - - #[cfg(not(bootstrap))] - cfg_select! { $($tokens)* } - }; -} - -cfg_select_dispatch! { +cfg_select! { target_os = "linux" => { mod linux; use linux as imp; diff --git a/compiler/rustc_data_structures/src/lib.rs b/compiler/rustc_data_structures/src/lib.rs index 0431182e9e2..53178d09348 100644 --- a/compiler/rustc_data_structures/src/lib.rs +++ b/compiler/rustc_data_structures/src/lib.rs @@ -10,9 +10,6 @@ #![allow(internal_features)] #![allow(rustc::default_hash_types)] #![allow(rustc::potential_query_instability)] -#![cfg_attr(bootstrap, feature(cfg_match))] -#![cfg_attr(not(bootstrap), feature(cfg_select))] -#![cfg_attr(not(bootstrap), feature(sized_hierarchy))] #![deny(unsafe_op_in_unsafe_fn)] #![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")] #![doc(rust_logo)] @@ -22,6 +19,7 @@ #![feature(ascii_char_variants)] #![feature(assert_matches)] #![feature(auto_traits)] +#![feature(cfg_select)] #![feature(core_intrinsics)] #![feature(dropck_eyepatch)] #![feature(extend_one)] @@ -33,6 +31,7 @@ #![feature(ptr_alignment_type)] #![feature(rustc_attrs)] #![feature(rustdoc_internals)] +#![feature(sized_hierarchy)] #![feature(test)] #![feature(thread_id_value)] #![feature(type_alias_impl_trait)] @@ -44,9 +43,6 @@ use std::fmt; pub use atomic_ref::AtomicRef; pub use ena::{snapshot_vec, undo_log, unify}; pub use rustc_index::static_assert_size; -// re-exported for `rustc_smir` -// FIXME(sized_hierarchy): remove with `cfg(bootstrap)`, see `rustc_serialize/src/lib.rs` -pub use rustc_serialize::PointeeSized; pub mod aligned; pub mod base_n; diff --git a/compiler/rustc_data_structures/src/marker.rs b/compiler/rustc_data_structures/src/marker.rs index 4846bc997f1..2be9ba292f9 100644 --- a/compiler/rustc_data_structures/src/marker.rs +++ b/compiler/rustc_data_structures/src/marker.rs @@ -1,6 +1,5 @@ use std::alloc::Allocator; - -use rustc_serialize::PointeeSized; +use std::marker::PointeeSized; #[diagnostic::on_unimplemented(message = "`{Self}` doesn't implement `DynSend`. \ Add it to `rustc_data_structures::marker` or use `IntoDynSyncSend` if it's already `Send`")] diff --git a/compiler/rustc_data_structures/src/profiling.rs b/compiler/rustc_data_structures/src/profiling.rs index e3a01e4035c..36649a36070 100644 --- a/compiler/rustc_data_structures/src/profiling.rs +++ b/compiler/rustc_data_structures/src/profiling.rs @@ -859,19 +859,8 @@ fn get_thread_id() -> u32 { std::thread::current().id().as_u64().get() as u32 } -// cfg(bootstrap) -macro_rules! cfg_select_dispatch { - ($($tokens:tt)*) => { - #[cfg(bootstrap)] - cfg_match! { $($tokens)* } - - #[cfg(not(bootstrap))] - cfg_select! { $($tokens)* } - }; -} - // Memory reporting -cfg_select_dispatch! { +cfg_select! { windows => { pub fn get_resident_set_size() -> Option<usize> { use windows::{ |
