Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd8fe589

Browse files
committed
remove cfg(bootstrap)
1 parenta2ff49b commitd8fe589

File tree

11 files changed

+20
-84
lines changed

11 files changed

+20
-84
lines changed

‎alloc/src/boxed.rs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,7 @@
145145
//! to `into_iter()` for boxed slices will defer to the slice implementation on editions before
146146
//! 2024:
147147
//!
148-
#![cfg_attr(bootstrap, doc ="```rust,edition2021,ignore")]
149-
#![cfg_attr(not(bootstrap), doc ="```rust,edition2021")]
148+
//! ```rust,edition2021
150149
//! // Rust 2015, 2018, and 2021:
151150
//!
152151
//! # #![allow(boxed_slice_into_iter)] // override our `deny(warnings)`

‎alloc/src/lib.rs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@
165165
//
166166
// Language features:
167167
// tidy-alphabetical-start
168-
#![cfg_attr(bootstrap, feature(exclusive_range_pattern))]
169168
#![cfg_attr(not(test), feature(coroutine_trait))]
170169
#![cfg_attr(test, feature(panic_update_hook))]
171170
#![cfg_attr(test, feature(test))]

‎core/src/future/async_drop.rs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ async unsafe fn either<O: IntoFuture<Output = ()>, M: IntoFuture<Output = ()>, T
256256
}
257257
}
258258

259-
#[cfg(not(bootstrap))]
260259
#[lang ="async_drop_deferred_drop_in_place"]
261260
asyncunsafefndeferred_drop_in_place<T>(to_drop:*mutT){
262261
// SAFETY: same safety requirements as with drop_in_place (implied by

‎core/src/future/future.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ use crate::task::{Context, Poll};
3535
pubtraitFuture{
3636
/// The type of value produced on completion.
3737
#[stable(feature ="futures_api", since ="1.36.0")]
38-
#[cfg_attr(not(bootstrap),lang ="future_output")]
38+
#[lang ="future_output"]
3939
typeOutput;
4040

4141
/// Attempt to resolve the future to a final value, registering

‎core/src/intrinsics.rs‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ pub const unsafe fn assume(b: bool) {
986986
#[unstable(feature ="core_intrinsics", issue ="none")]
987987
#[rustc_intrinsic]
988988
#[rustc_nounwind]
989-
#[cfg_attr(not(bootstrap),miri::intrinsic_fallback_is_spec)]
989+
#[miri::intrinsic_fallback_is_spec]
990990
pubconstfnlikely(b:bool) ->bool{
991991
b
992992
}
@@ -1006,7 +1006,7 @@ pub const fn likely(b: bool) -> bool {
10061006
#[unstable(feature ="core_intrinsics", issue ="none")]
10071007
#[rustc_intrinsic]
10081008
#[rustc_nounwind]
1009-
#[cfg_attr(not(bootstrap),miri::intrinsic_fallback_is_spec)]
1009+
#[miri::intrinsic_fallback_is_spec]
10101010
pubconstfnunlikely(b:bool) ->bool{
10111011
b
10121012
}
@@ -2482,7 +2482,7 @@ extern "rust-intrinsic" {
24822482
#[rustc_nounwind]
24832483
#[rustc_do_not_const_check]
24842484
#[inline]
2485-
#[cfg_attr(not(bootstrap),miri::intrinsic_fallback_is_spec)]
2485+
#[miri::intrinsic_fallback_is_spec]
24862486
pubconstfnptr_guaranteed_cmp<T>(ptr:*constT,other:*constT) ->u8{
24872487
(ptr == other)asu8
24882488
}
@@ -2747,7 +2747,7 @@ pub const fn ub_checks() -> bool {
27472747
#[unstable(feature ="core_intrinsics", issue ="none")]
27482748
#[rustc_nounwind]
27492749
#[rustc_intrinsic]
2750-
#[cfg_attr(not(bootstrap),miri::intrinsic_fallback_is_spec)]
2750+
#[miri::intrinsic_fallback_is_spec]
27512751
pubconstunsafefnconst_allocate(_size:usize,_align:usize) ->*mutu8{
27522752
// const eval overrides this function, but runtime code for now just returns null pointers.
27532753
// See <https://github.com/rust-lang/rust/issues/93935>.
@@ -2768,7 +2768,7 @@ pub const unsafe fn const_allocate(_size: usize, _align: usize) -> *mut u8 {
27682768
#[unstable(feature ="core_intrinsics", issue ="none")]
27692769
#[rustc_nounwind]
27702770
#[rustc_intrinsic]
2771-
#[cfg_attr(not(bootstrap),miri::intrinsic_fallback_is_spec)]
2771+
#[miri::intrinsic_fallback_is_spec]
27722772
pubconstunsafefnconst_deallocate(_ptr:*mutu8,_size:usize,_align:usize){
27732773
// Runtime NOP
27742774
}
@@ -2828,7 +2828,6 @@ impl<P: ?Sized, T: ptr::Thin> AggregateRawPtr<*mut T> for *mut P {
28282828
#[rustc_const_unstable(feature ="ptr_metadata", issue ="81513")]
28292829
#[rustc_intrinsic]
28302830
#[rustc_intrinsic_must_be_overridden]
2831-
#[cfg(not(bootstrap))]
28322831
pubconstfnptr_metadata<P: ptr::Pointee<Metadata =M> + ?Sized,M>(_ptr:*constP) ->M{
28332832
// To implement a fallback we'd have to assume the layout of the pointer,
28342833
// but the whole point of this intrinsic is that we shouldn't do that.

‎core/src/intrinsics/simd.rs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,6 @@ extern "rust-intrinsic" {
573573
///
574574
/// `T` must be a vector of integers.
575575
#[rustc_nounwind]
576-
#[cfg(not(bootstrap))]
577576
pubfnsimd_ctpop<T>(x:T) ->T;
578577

579578
/// Count the trailing zeros of each element.

‎core/src/iter/traits/collect.rs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,7 @@ where
311311
label ="`{Self}` is not an iterator",
312312
message ="`{Self}` is not an iterator"
313313
)]
314-
#[cfg_attr(bootstrap, rustc_skip_array_during_method_dispatch)]
315-
#[cfg_attr(not(bootstrap), rustc_skip_during_method_dispatch(array, boxed_slice))]
314+
#[rustc_skip_during_method_dispatch(array, boxed_slice)]
316315
#[stable(feature ="rust1", since ="1.0.0")]
317316
pubtraitIntoIterator{
318317
/// The type of the elements being iterated over.

‎core/src/num/int_macros.rs‎

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,17 +1165,13 @@ macro_rules! int_impl {
11651165
#[inline(always)]
11661166
#[cfg_attr(miri, track_caller)]// even without panics, this helps for Miri backtraces
11671167
pubconstunsafefn unchecked_neg(self) ->Self{
1168-
// ICE resolved by #125184 isn't in bootstrap compiler
1169-
#[cfg(not(bootstrap))]
1170-
{
1171-
assert_unsafe_precondition!(
1172-
check_language_ub,
1173-
concat!(stringify!($SelfT),"::unchecked_neg cannot overflow"),
1174-
(
1175-
lhs: $SelfT =self,
1176-
) => !lhs.overflowing_neg().1,
1177-
);
1178-
}
1168+
assert_unsafe_precondition!(
1169+
check_language_ub,
1170+
concat!(stringify!($SelfT),"::unchecked_neg cannot overflow"),
1171+
(
1172+
lhs: $SelfT =self,
1173+
) => !lhs.overflowing_neg().1,
1174+
);
11791175

11801176
// SAFETY: this is guaranteed to be safe by the caller.
11811177
unsafe{

‎core/src/ops/async_function.rs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub trait AsyncFn<Args: Tuple>: AsyncFnMut<Args> {
2626
pubtraitAsyncFnMut<Args:Tuple>:AsyncFnOnce<Args>{
2727
/// Future returned by [`AsyncFnMut::async_call_mut`] and [`AsyncFn::async_call`].
2828
#[unstable(feature ="async_fn_traits", issue ="none")]
29-
#[cfg_attr(not(bootstrap),lang ="call_ref_future")]
29+
#[lang ="call_ref_future"]
3030
typeCallRefFuture<'a>:Future<Output =Self::Output>
3131
where
3232
Self:'a;
@@ -47,12 +47,12 @@ pub trait AsyncFnMut<Args: Tuple>: AsyncFnOnce<Args> {
4747
pubtraitAsyncFnOnce<Args:Tuple>{
4848
/// Future returned by [`AsyncFnOnce::async_call_once`].
4949
#[unstable(feature ="async_fn_traits", issue ="none")]
50-
#[cfg_attr(not(bootstrap),lang ="call_once_future")]
50+
#[lang ="call_once_future"]
5151
typeCallOnceFuture:Future<Output =Self::Output>;
5252

5353
/// Output type of the called closure's future.
5454
#[unstable(feature ="async_fn_traits", issue ="none")]
55-
#[cfg_attr(not(bootstrap),lang ="async_fn_once_output")]
55+
#[lang ="async_fn_once_output"]
5656
typeOutput;
5757

5858
/// Call the [`AsyncFnOnce`], returning a future which may move out of the called closure.
@@ -146,7 +146,7 @@ mod internal_implementation_detail {
146146
// `for<'env> fn() -> (&'env T, ...)`. This allows us to represent the binder
147147
// of the closure's self-capture, and these upvar types will be instantiated with
148148
// the `'closure_env` region provided to the associated type.
149-
#[cfg_attr(not(bootstrap),lang ="async_fn_kind_upvars")]
149+
#[lang ="async_fn_kind_upvars"]
150150
typeUpvars<'closure_env,Inputs,Upvars,BorrowedUpvarsAsFnPtr>;
151151
}
152152
}

‎core/src/ptr/metadata.rs‎

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
usecrate::fmt;
44
usecrate::hash::{Hash,Hasher};
55
usecrate::intrinsics::aggregate_raw_ptr;
6-
#[cfg(not(bootstrap))]
76
usecrate::intrinsics::ptr_metadata;
87
usecrate::marker::Freeze;
98

@@ -96,17 +95,7 @@ pub trait Thin = Pointee<Metadata = ()>;
9695
#[rustc_const_unstable(feature = "ptr_metadata", issue = "81513")]
9796
#[inline]
9897
pubconstfnmetadata<T: ?Sized>(ptr:*constT) -> <TasPointee>::Metadata{
99-
#[cfg(bootstrap)]
100-
{
101-
// SAFETY: Accessing the value from the `PtrRepr` union is safe since *const T
102-
// and PtrComponents<T> have the same memory layouts. Only std can make this
103-
// guarantee.
104-
unsafe{PtrRepr{const_ptr: ptr}.components.metadata}
105-
}
106-
#[cfg(not(bootstrap))]
107-
{
108-
ptr_metadata(ptr)
109-
}
98+
ptr_metadata(ptr)
11099
}
111100

112101
/// Forms a (possibly-wide) raw pointer from a data pointer and metadata.
@@ -140,33 +129,6 @@ pub const fn from_raw_parts_mut<T: ?Sized>(
140129
aggregate_raw_ptr(data_pointer, metadata)
141130
}
142131

143-
#[repr(C)]
144-
#[cfg(bootstrap)]
145-
unionPtrRepr<T: ?Sized>{
146-
const_ptr:*constT,
147-
mut_ptr:*mutT,
148-
components:PtrComponents<T>,
149-
}
150-
151-
#[repr(C)]
152-
#[cfg(bootstrap)]
153-
structPtrComponents<T: ?Sized>{
154-
data_pointer:*const(),
155-
metadata: <TasPointee>::Metadata,
156-
}
157-
158-
// Manual impl needed to avoid `T: Copy` bound.
159-
#[cfg(bootstrap)]
160-
impl<T: ?Sized>CopyforPtrComponents<T>{}
161-
162-
// Manual impl needed to avoid `T: Clone` bound.
163-
#[cfg(bootstrap)]
164-
impl<T: ?Sized>CloneforPtrComponents<T>{
165-
fnclone(&self) ->Self{
166-
*self
167-
}
168-
}
169-
170132
/// The metadata for a `Dyn = dyn SomeTrait` trait object type.
171133
///
172134
/// It is a pointer to a vtable (virtual call table)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp