Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 26d95d3

Browse files
committed
remove cfg bootstrap from library tree
Signed-off-by: onur-ozkan <work@onurozkan.dev>
1 parent 9c38867 commit 26d95d3

File tree

9 files changed

+6
-61
lines changed

9 files changed

+6
-61
lines changed

library/core/src/clone.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ pub macro Clone($item:item) {
216216
/// Use closures allow captured values to be automatically used.
217217
/// This is similar to have a closure that you would call `.use` over each captured value.
218218
#[unstable(feature = "ergonomic_clones", issue = "132290")]
219-
#[cfg_attr(not(bootstrap), lang = "use_cloned")]
219+
#[lang = "use_cloned"]
220220
pub trait UseCloned: Clone {
221221
// Empty.
222222
}

library/core/src/fmt/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1546,7 +1546,7 @@ unsafe fn run(fmt: &mut Formatter<'_>, arg: &rt::Placeholder, args: &[rt::Argume
15461546
#[cfg(bootstrap)]
15471547
unsafe fn getcount(args: &[rt::Argument<'_>], cnt: &rt::Count) -> Option<u16> {
15481548
match *cnt {
1549-
rt::Count::Is(n) => Some(n as u16),
1549+
rt::Count::Is(n) => Some(n),
15501550
rt::Count::Implied => None,
15511551
rt::Count::Param(i) => {
15521552
debug_assert!(i < args.len());

library/core/src/fmt/rt.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@ pub enum Alignment {
5151
#[derive(Copy, Clone)]
5252
pub enum Count {
5353
/// Specified with a literal number, stores the value
54-
#[cfg(bootstrap)]
55-
Is(usize),
56-
/// Specified with a literal number, stores the value
57-
#[cfg(not(bootstrap))]
5854
Is(u16),
5955
/// Specified using `$` and `*` syntaxes, stores the index into `args`
6056
Param(usize),

library/core/src/intrinsics/mod.rs

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2307,41 +2307,17 @@ pub unsafe fn truncf128(x: f128) -> f128;
23072307
/// [`f16::round_ties_even`](../../std/primitive.f16.html#method.round_ties_even)
23082308
#[rustc_intrinsic]
23092309
#[rustc_nounwind]
2310-
#[cfg(not(bootstrap))]
23112310
pub fn round_ties_even_f16(x: f16) -> f16;
23122311

2313-
/// To be removed on next bootstrap bump.
2314-
#[cfg(bootstrap)]
2315-
pub fn round_ties_even_f16(x: f16) -> f16 {
2316-
#[rustc_intrinsic]
2317-
#[rustc_nounwind]
2318-
unsafe fn rintf16(x: f16) -> f16;
2319-
2320-
// SAFETY: this intrinsic isn't actually unsafe
2321-
unsafe { rintf16(x) }
2322-
}
2323-
23242312
/// Returns the nearest integer to an `f32`. Rounds half-way cases to the number with an even
23252313
/// least significant digit.
23262314
///
23272315
/// The stabilized version of this intrinsic is
23282316
/// [`f32::round_ties_even`](../../std/primitive.f32.html#method.round_ties_even)
23292317
#[rustc_intrinsic]
23302318
#[rustc_nounwind]
2331-
#[cfg(not(bootstrap))]
23322319
pub fn round_ties_even_f32(x: f32) -> f32;
23332320

2334-
/// To be removed on next bootstrap bump.
2335-
#[cfg(bootstrap)]
2336-
pub fn round_ties_even_f32(x: f32) -> f32 {
2337-
#[rustc_intrinsic]
2338-
#[rustc_nounwind]
2339-
unsafe fn rintf32(x: f32) -> f32;
2340-
2341-
// SAFETY: this intrinsic isn't actually unsafe
2342-
unsafe { rintf32(x) }
2343-
}
2344-
23452321
/// Provided for compatibility with stdarch. DO NOT USE.
23462322
#[inline(always)]
23472323
pub unsafe fn rintf32(x: f32) -> f32 {
@@ -2355,20 +2331,8 @@ pub unsafe fn rintf32(x: f32) -> f32 {
23552331
/// [`f64::round_ties_even`](../../std/primitive.f64.html#method.round_ties_even)
23562332
#[rustc_intrinsic]
23572333
#[rustc_nounwind]
2358-
#[cfg(not(bootstrap))]
23592334
pub fn round_ties_even_f64(x: f64) -> f64;
23602335

2361-
/// To be removed on next bootstrap bump.
2362-
#[cfg(bootstrap)]
2363-
pub fn round_ties_even_f64(x: f64) -> f64 {
2364-
#[rustc_intrinsic]
2365-
#[rustc_nounwind]
2366-
unsafe fn rintf64(x: f64) -> f64;
2367-
2368-
// SAFETY: this intrinsic isn't actually unsafe
2369-
unsafe { rintf64(x) }
2370-
}
2371-
23722336
/// Provided for compatibility with stdarch. DO NOT USE.
23732337
#[inline(always)]
23742338
pub unsafe fn rintf64(x: f64) -> f64 {
@@ -2382,20 +2346,8 @@ pub unsafe fn rintf64(x: f64) -> f64 {
23822346
/// [`f128::round_ties_even`](../../std/primitive.f128.html#method.round_ties_even)
23832347
#[rustc_intrinsic]
23842348
#[rustc_nounwind]
2385-
#[cfg(not(bootstrap))]
23862349
pub fn round_ties_even_f128(x: f128) -> f128;
23872350

2388-
/// To be removed on next bootstrap bump.
2389-
#[cfg(bootstrap)]
2390-
pub fn round_ties_even_f128(x: f128) -> f128 {
2391-
#[rustc_intrinsic]
2392-
#[rustc_nounwind]
2393-
unsafe fn rintf128(x: f128) -> f128;
2394-
2395-
// SAFETY: this intrinsic isn't actually unsafe
2396-
unsafe { rintf128(x) }
2397-
}
2398-
23992351
/// Returns the nearest integer to an `f16`. Rounds half-way cases away from zero.
24002352
///
24012353
/// The stabilized version of this intrinsic is

library/core/src/macros/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1753,7 +1753,6 @@ pub(crate) mod builtin {
17531753
reason = "`type_alias_impl_trait` has open design concerns"
17541754
)]
17551755
#[rustc_builtin_macro]
1756-
#[cfg(not(bootstrap))]
17571756
pub macro define_opaque($($tt:tt)*) {
17581757
/* compiler built-in */
17591758
}

library/core/src/pat.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ macro_rules! pattern_type {
2525
)]
2626
pub trait RangePattern {
2727
/// Trait version of the inherent `MIN` assoc const.
28-
#[cfg_attr(not(bootstrap), lang = "RangeMin")]
28+
#[lang = "RangeMin"]
2929
const MIN: Self;
3030

3131
/// Trait version of the inherent `MIN` assoc const.
32-
#[cfg_attr(not(bootstrap), lang = "RangeMax")]
32+
#[lang = "RangeMax"]
3333
const MAX: Self;
3434

3535
/// A compile-time helper to subtract 1 for exclusive ranges.
36-
#[cfg_attr(not(bootstrap), lang = "RangeSub")]
36+
#[lang = "RangeSub"]
3737
#[track_caller]
3838
fn sub_one(self) -> Self;
3939
}

library/core/src/prelude/v1.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,5 +117,4 @@ pub use crate::macros::builtin::deref;
117117
issue = "63063",
118118
reason = "`type_alias_impl_trait` has open design concerns"
119119
)]
120-
#[cfg(not(bootstrap))]
121120
pub use crate::macros::builtin::define_opaque;

library/std/src/backtrace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ mod helper {
432432
use super::*;
433433
pub(super) type LazyResolve = impl (FnOnce() -> Capture) + Send + Sync + UnwindSafe;
434434

435-
#[cfg_attr(not(bootstrap), define_opaque(LazyResolve))]
435+
#[define_opaque(LazyResolve)]
436436
pub(super) fn lazy_resolve(mut capture: Capture) -> LazyResolve {
437437
move || {
438438
// Use the global backtrace lock to synchronize this as it's a

library/std/src/prelude/v1.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ pub use core::prelude::v1::deref;
109109
issue = "63063",
110110
reason = "`type_alias_impl_trait` has open design concerns"
111111
)]
112-
#[cfg(not(bootstrap))]
113112
pub use core::prelude::v1::define_opaque;
114113

115114
// The file so far is equivalent to core/src/prelude/v1.rs. It is duplicated

0 commit comments

Comments
 (0)