Skip to content

Commit 2054acb

Browse files
authoredMay 31, 2023
Rollup merge of #112103 - Mark-Simulacrum:bootstrap-update, r=clubby789
Bootstrap update to 1.71 beta Best reviewed by-commit.
·
1.88.01.72.0
2 parents 9e108f8 + 42e7571 commit 2054acb

File tree

22 files changed

+459
-519
lines changed

22 files changed

+459
-519
lines changed
 

‎compiler/rustc_feature/src/accepted.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ declare_features! (
131131
/// Allows `crate` in paths.
132132
(accepted, crate_in_paths, "1.30.0", Some(45477), None),
133133
/// Allows using `#[debugger_visualizer]` attribute.
134-
(accepted, debugger_visualizer, "CURRENT_RUSTC_VERSION", Some(95939), None),
134+
(accepted, debugger_visualizer, "1.71.0", Some(95939), None),
135135
/// Allows rustc to inject a default alloc_error_handler
136136
(accepted, default_alloc_error_handler, "1.68.0", Some(66741), None),
137137
/// Allows using assigning a default type to type parameters in algebraic data type definitions.
@@ -281,7 +281,7 @@ declare_features! (
281281
/// Allows use of the postfix `?` operator in expressions.
282282
(accepted, question_mark, "1.13.0", Some(31436), None),
283283
/// Allows the use of raw-dylibs (RFC 2627).
284-
(accepted, raw_dylib, "CURRENT_RUSTC_VERSION", Some(58713), None),
284+
(accepted, raw_dylib, "1.71.0", Some(58713), None),
285285
/// Allows keywords to be escaped for use as identifiers.
286286
(accepted, raw_identifiers, "1.30.0", Some(48589), None),
287287
/// Allows relaxing the coherence rules such that

‎compiler/rustc_feature/src/active.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ declare_features! (
165165
/// Allows the `multiple_supertrait_upcastable` lint.
166166
(active, multiple_supertrait_upcastable, "1.69.0", None, None),
167167
/// Allow negative trait bounds. This is an internal-only feature for testing the trait solver!
168-
(incomplete, negative_bounds, "CURRENT_RUSTC_VERSION", None, None),
168+
(incomplete, negative_bounds, "1.71.0", None, None),
169169
/// Allows using `#[omit_gdb_pretty_printer_section]`.
170170
(active, omit_gdb_pretty_printer_section, "1.5.0", None, None),
171171
/// Allows using `#[prelude_import]` on glob `use` items.
@@ -314,15 +314,15 @@ declare_features! (
314314
/// Allows async functions to be declared, implemented, and used in traits.
315315
(active, async_fn_in_trait, "1.66.0", Some(91611), None),
316316
/// Allows builtin # foo() syntax
317-
(active, builtin_syntax, "CURRENT_RUSTC_VERSION", Some(110680), None),
317+
(active, builtin_syntax, "1.71.0", Some(110680), None),
318318
/// Allows `c"foo"` literals.
319-
(active, c_str_literals, "CURRENT_RUSTC_VERSION", Some(105723), None),
319+
(active, c_str_literals, "1.71.0", Some(105723), None),
320320
/// Treat `extern "C"` function as nounwind.
321321
(active, c_unwind, "1.52.0", Some(74990), None),
322322
/// Allows using C-variadics.
323323
(active, c_variadic, "1.34.0", Some(44930), None),
324324
/// Allows the use of `#[cfg(overflow_checks)` to check if integer overflow behaviour.
325-
(active, cfg_overflow_checks, "CURRENT_RUSTC_VERSION", Some(111466), None),
325+
(active, cfg_overflow_checks, "1.71.0", Some(111466), None),
326326
/// Allows the use of `#[cfg(sanitize = "option")]`; set when -Zsanitizer is used.
327327
(active, cfg_sanitize, "1.41.0", Some(39699), None),
328328
/// Allows `cfg(target_abi = "...")`.
@@ -338,7 +338,7 @@ declare_features! (
338338
/// Allow conditional compilation depending on rust version
339339
(active, cfg_version, "1.45.0", Some(64796), None),
340340
/// Allows to use the `#[cfi_encoding = ""]` attribute.
341-
(active, cfi_encoding, "CURRENT_RUSTC_VERSION", Some(89653), None),
341+
(active, cfi_encoding, "1.71.0", Some(89653), None),
342342
/// Allows `for<...>` on closures and generators.
343343
(active, closure_lifetime_binder, "1.64.0", Some(97362), None),
344344
/// Allows `#[track_caller]` on closures and generators.

‎library/alloc/src/alloc.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ extern "Rust" {
3838
#[rustc_nounwind]
3939
fn __rust_alloc_zeroed(size: usize, align: usize) -> *mut u8;
4040

41-
#[cfg(not(bootstrap))]
4241
static __rust_no_alloc_shim_is_unstable: u8;
4342
}
4443

@@ -96,7 +95,6 @@ pub unsafe fn alloc(layout: Layout) -> *mut u8 {
9695
unsafe {
9796
// Make sure we don't accidentally allow omitting the allocator shim in
9897
// stable code until it is actually stabilized.
99-
#[cfg(not(bootstrap))]
10098
core::ptr::read_volatile(&__rust_no_alloc_shim_is_unstable);
10199

102100
__rust_alloc(layout.size(), layout.align())

‎library/alloc/src/string.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2624,7 +2624,7 @@ impl ToString for String {
26242624
}
26252625

26262626
#[cfg(not(no_global_oom_handling))]
2627-
#[stable(feature = "fmt_arguments_to_string_specialization", since = "CURRENT_RUSTC_VERSION")]
2627+
#[stable(feature = "fmt_arguments_to_string_specialization", since = "1.71.0")]
26282628
impl ToString for fmt::Arguments<'_> {
26292629
#[inline]
26302630
fn to_string(&self) -> String {

‎library/core/src/ffi/c_str.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ use crate::str;
8181
#[derive(Hash)]
8282
#[stable(feature = "core_c_str", since = "1.64.0")]
8383
#[rustc_has_incoherent_inherent_impls]
84-
#[cfg_attr(not(bootstrap), lang = "CStr")]
84+
#[lang = "CStr"]
8585
// FIXME:
8686
// `fn from` in `impl From<&CStr> for Box<CStr>` current implementation relies
8787
// on `CStr` being layout-compatible with `[u8]`.
@@ -531,8 +531,8 @@ impl CStr {
531531
/// # }
532532
/// ```
533533
#[inline]
534-
#[stable(feature = "cstr_is_empty", since = "CURRENT_RUSTC_VERSION")]
535-
#[rustc_const_stable(feature = "cstr_is_empty", since = "CURRENT_RUSTC_VERSION")]
534+
#[stable(feature = "cstr_is_empty", since = "1.71.0")]
535+
#[rustc_const_stable(feature = "cstr_is_empty", since = "1.71.0")]
536536
pub const fn is_empty(&self) -> bool {
537537
// SAFETY: We know there is at least one byte; for empty strings it
538538
// is the NUL terminator.

‎library/core/src/ffi/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ mod c_long_definition {
202202
// would be uninhabited and at least dereferencing such pointers would
203203
// be UB.
204204
#[doc = include_str!("c_void.md")]
205-
#[cfg_attr(not(bootstrap), lang = "c_void")]
205+
#[lang = "c_void"]
206206
#[cfg_attr(not(doc), repr(u8))] // work around https://github.com/rust-lang/rust/issues/90435
207207
#[stable(feature = "core_c_void", since = "1.30.0")]
208208
pub enum c_void {

‎library/core/src/hash/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ pub trait BuildHasher {
695695
/// bh.hash_one(&OrderAmbivalentPair(2, 10))
696696
/// );
697697
/// ```
698-
#[stable(feature = "build_hasher_simple_hash_one", since = "CURRENT_RUSTC_VERSION")]
698+
#[stable(feature = "build_hasher_simple_hash_one", since = "1.71.0")]
699699
fn hash_one<T: Hash>(&self, x: T) -> u64
700700
where
701701
Self: Sized,

‎library/core/src/intrinsics.rs

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,7 +1385,6 @@ extern "rust-intrinsic" {
13851385
///
13861386
/// This is not expected to ever be exposed directly to users, rather it
13871387
/// may eventually be exposed through some more-constrained API.
1388-
#[cfg(not(bootstrap))]
13891388
#[rustc_const_stable(feature = "const_transmute", since = "1.56.0")]
13901389
#[rustc_nounwind]
13911390
pub fn transmute_unchecked<Src, Dst>(src: Src) -> Dst;
@@ -1425,19 +1424,11 @@ extern "rust-intrinsic" {
14251424
/// returned value will result in undefined behavior.
14261425
///
14271426
/// The stabilized version of this intrinsic is [`pointer::offset`].
1428-
#[cfg(not(bootstrap))]
14291427
#[must_use = "returns a new pointer rather than modifying its argument"]
14301428
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
14311429
#[rustc_nounwind]
14321430
pub fn offset<Ptr, Delta>(dst: Ptr, offset: Delta) -> Ptr;
14331431

1434-
/// The bootstrap version of this is more restricted.
1435-
#[cfg(bootstrap)]
1436-
#[must_use = "returns a new pointer rather than modifying its argument"]
1437-
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
1438-
#[rustc_nounwind]
1439-
pub fn offset<T>(dst: *const T, offset: isize) -> *const T;
1440-
14411432
/// Calculates the offset from a pointer, potentially wrapping.
14421433
///
14431434
/// This is implemented as an intrinsic to avoid converting to and from an
@@ -2260,7 +2251,7 @@ extern "rust-intrinsic" {
22602251
/// This intrinsic can *only* be called where the pointer is a local without
22612252
/// projections (`read_via_copy(ptr)`, not `read_via_copy(*ptr)`) so that it
22622253
/// trivially obeys runtime-MIR rules about derefs in operands.
2263-
#[rustc_const_stable(feature = "const_ptr_read", since = "CURRENT_RUSTC_VERSION")]
2254+
#[rustc_const_stable(feature = "const_ptr_read", since = "1.71.0")]
22642255
#[rustc_nounwind]
22652256
pub fn read_via_copy<T>(ptr: *const T) -> T;
22662257

@@ -2270,7 +2261,6 @@ extern "rust-intrinsic" {
22702261
/// This intrinsic can *only* be called where the pointer is a local without
22712262
/// projections (`write_via_move(ptr, x)`, not `write_via_move(*ptr, x)`) so
22722263
/// that it trivially obeys runtime-MIR rules about derefs in operands.
2273-
#[cfg(not(bootstrap))]
22742264
#[rustc_const_unstable(feature = "const_ptr_write", issue = "86302")]
22752265
#[rustc_nounwind]
22762266
pub fn write_via_move<T>(ptr: *mut T, value: T);
@@ -2832,24 +2822,3 @@ pub const unsafe fn write_bytes<T>(dst: *mut T, val: u8, count: usize) {
28322822
write_bytes(dst, val, count)
28332823
}
28342824
}
2835-
2836-
/// Polyfill for bootstrap
2837-
#[cfg(bootstrap)]
2838-
pub const unsafe fn transmute_unchecked<Src, Dst>(src: Src) -> Dst {
2839-
use crate::mem::*;
2840-
// SAFETY: It's a transmute -- the caller promised it's fine.
2841-
unsafe { transmute_copy(&ManuallyDrop::new(src)) }
2842-
}
2843-
2844-
/// Polyfill for bootstrap
2845-
#[cfg(bootstrap)]
2846-
pub const unsafe fn write_via_move<T>(ptr: *mut T, value: T) {
2847-
use crate::mem::*;
2848-
// SAFETY: the caller must guarantee that `dst` is valid for writes.
2849-
// `dst` cannot overlap `src` because the caller has mutable access
2850-
// to `dst` while `src` is owned by this function.
2851-
unsafe {
2852-
copy_nonoverlapping::<T>(&value, ptr, 1);
2853-
forget(value);
2854-
}
2855-
}

‎library/core/src/marker.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -971,15 +971,14 @@ pub trait Tuple {}
971971
pub trait PointerLike {}
972972

973973
/// A marker for types which can be used as types of `const` generic parameters.
974-
#[cfg_attr(not(bootstrap), lang = "const_param_ty")]
974+
#[lang = "const_param_ty"]
975975
#[unstable(feature = "adt_const_params", issue = "95174")]
976976
#[rustc_on_unimplemented(message = "`{Self}` can't be used as a const parameter type")]
977977
pub trait ConstParamTy: StructuralEq {}
978978

979979
/// Derive macro generating an impl of the trait `ConstParamTy`.
980980
#[rustc_builtin_macro]
981981
#[unstable(feature = "adt_const_params", issue = "95174")]
982-
#[cfg(not(bootstrap))]
983982
pub macro ConstParamTy($item:item) {
984983
/* compiler built-in */
985984
}

‎library/core/src/mem/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,7 @@ pub const fn replace<T>(dest: &mut T, src: T) -> T {
968968
/// Integers and other types implementing [`Copy`] are unaffected by `drop`.
969969
///
970970
/// ```
971-
/// # #![cfg_attr(not(bootstrap), allow(dropping_copy_types))]
971+
/// # #![allow(dropping_copy_types)]
972972
/// #[derive(Copy, Clone)]
973973
/// struct Foo(u8);
974974
///
@@ -1316,7 +1316,6 @@ impl<T> SizedTypeProperties for T {}
13161316
///
13171317
/// assert_eq!(mem::offset_of!(NestedA, b.0), 0);
13181318
/// ```
1319-
#[cfg(not(bootstrap))]
13201319
#[unstable(feature = "offset_of", issue = "106655")]
13211320
#[allow_internal_unstable(builtin_syntax)]
13221321
pub macro offset_of($Container:ty, $($fields:tt).+ $(,)?) {

‎library/core/src/num/nonzero.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -769,8 +769,8 @@ macro_rules! nonzero_signed_operations {
769769
/// ```
770770
#[must_use]
771771
#[inline]
772-
#[stable(feature = "nonzero_negation_ops", since = "CURRENT_RUSTC_VERSION")]
773-
#[rustc_const_stable(feature = "nonzero_negation_ops", since = "CURRENT_RUSTC_VERSION")]
772+
#[stable(feature = "nonzero_negation_ops", since = "1.71.0")]
773+
#[rustc_const_stable(feature = "nonzero_negation_ops", since = "1.71.0")]
774774
pub const fn is_positive(self) -> bool {
775775
self.get().is_positive()
776776
}
@@ -794,8 +794,8 @@ macro_rules! nonzero_signed_operations {
794794
/// ```
795795
#[must_use]
796796
#[inline]
797-
#[stable(feature = "nonzero_negation_ops", since = "CURRENT_RUSTC_VERSION")]
798-
#[rustc_const_stable(feature = "nonzero_negation_ops", since = "CURRENT_RUSTC_VERSION")]
797+
#[stable(feature = "nonzero_negation_ops", since = "1.71.0")]
798+
#[rustc_const_stable(feature = "nonzero_negation_ops", since = "1.71.0")]
799799
pub const fn is_negative(self) -> bool {
800800
self.get().is_negative()
801801
}
@@ -819,8 +819,8 @@ macro_rules! nonzero_signed_operations {
819819
/// # }
820820
/// ```
821821
#[inline]
822-
#[stable(feature = "nonzero_negation_ops", since = "CURRENT_RUSTC_VERSION")]
823-
#[rustc_const_stable(feature = "nonzero_negation_ops", since = "CURRENT_RUSTC_VERSION")]
822+
#[stable(feature = "nonzero_negation_ops", since = "1.71.0")]
823+
#[rustc_const_stable(feature = "nonzero_negation_ops", since = "1.71.0")]
824824
pub const fn checked_neg(self) -> Option<$Ty> {
825825
if let Some(result) = self.get().checked_neg() {
826826
// SAFETY: negation of nonzero cannot yield zero values.
@@ -851,8 +851,8 @@ macro_rules! nonzero_signed_operations {
851851
/// # }
852852
/// ```
853853
#[inline]
854-
#[stable(feature = "nonzero_negation_ops", since = "CURRENT_RUSTC_VERSION")]
855-
#[rustc_const_stable(feature = "nonzero_negation_ops", since = "CURRENT_RUSTC_VERSION")]
854+
#[stable(feature = "nonzero_negation_ops", since = "1.71.0")]
855+
#[rustc_const_stable(feature = "nonzero_negation_ops", since = "1.71.0")]
856856
pub const fn overflowing_neg(self) -> ($Ty, bool) {
857857
let (result, overflow) = self.get().overflowing_neg();
858858
// SAFETY: negation of nonzero cannot yield zero values.
@@ -884,8 +884,8 @@ macro_rules! nonzero_signed_operations {
884884
/// # }
885885
/// ```
886886
#[inline]
887-
#[stable(feature = "nonzero_negation_ops", since = "CURRENT_RUSTC_VERSION")]
888-
#[rustc_const_stable(feature = "nonzero_negation_ops", since = "CURRENT_RUSTC_VERSION")]
887+
#[stable(feature = "nonzero_negation_ops", since = "1.71.0")]
888+
#[rustc_const_stable(feature = "nonzero_negation_ops", since = "1.71.0")]
889889
pub const fn saturating_neg(self) -> $Ty {
890890
if let Some(result) = self.checked_neg() {
891891
return result;
@@ -916,16 +916,16 @@ macro_rules! nonzero_signed_operations {
916916
/// # }
917917
/// ```
918918
#[inline]
919-
#[stable(feature = "nonzero_negation_ops", since = "CURRENT_RUSTC_VERSION")]
920-
#[rustc_const_stable(feature = "nonzero_negation_ops", since = "CURRENT_RUSTC_VERSION")]
919+
#[stable(feature = "nonzero_negation_ops", since = "1.71.0")]
920+
#[rustc_const_stable(feature = "nonzero_negation_ops", since = "1.71.0")]
921921
pub const fn wrapping_neg(self) -> $Ty {
922922
let result = self.get().wrapping_neg();
923923
// SAFETY: negation of nonzero cannot yield zero values.
924924
unsafe { $Ty::new_unchecked(result) }
925925
}
926926
}
927927

928-
#[stable(feature = "signed_nonzero_neg", since = "CURRENT_RUSTC_VERSION")]
928+
#[stable(feature = "signed_nonzero_neg", since = "1.71.0")]
929929
impl Neg for $Ty {
930930
type Output = $Ty;
931931

@@ -937,7 +937,7 @@ macro_rules! nonzero_signed_operations {
937937
}
938938

939939
forward_ref_unop! { impl Neg, neg for $Ty,
940-
#[stable(feature = "signed_nonzero_neg", since = "CURRENT_RUSTC_VERSION")] }
940+
#[stable(feature = "signed_nonzero_neg", since = "1.71.0")] }
941941
)+
942942
}
943943
}

‎library/core/src/ptr/const_ptr.rs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -916,16 +916,8 @@ impl<T: ?Sized> *const T {
916916
where
917917
T: Sized,
918918
{
919-
#[cfg(bootstrap)]
920919
// SAFETY: the caller must uphold the safety contract for `offset`.
921-
unsafe {
922-
self.offset(count as isize)
923-
}
924-
#[cfg(not(bootstrap))]
925-
// SAFETY: the caller must uphold the safety contract for `offset`.
926-
unsafe {
927-
intrinsics::offset(self, count)
928-
}
920+
unsafe { intrinsics::offset(self, count) }
929921
}
930922

931923
/// Calculates the offset from a pointer in bytes (convenience for `.byte_offset(count as isize)`).
@@ -1195,7 +1187,7 @@ impl<T: ?Sized> *const T {
11951187
///
11961188
/// [`ptr::read`]: crate::ptr::read()
11971189
#[stable(feature = "pointer_methods", since = "1.26.0")]
1198-
#[rustc_const_stable(feature = "const_ptr_read", since = "CURRENT_RUSTC_VERSION")]
1190+
#[rustc_const_stable(feature = "const_ptr_read", since = "1.71.0")]
11991191
#[inline]
12001192
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
12011193
pub const unsafe fn read(self) -> T
@@ -1236,7 +1228,7 @@ impl<T: ?Sized> *const T {
12361228
///
12371229
/// [`ptr::read_unaligned`]: crate::ptr::read_unaligned()
12381230
#[stable(feature = "pointer_methods", since = "1.26.0")]
1239-
#[rustc_const_stable(feature = "const_ptr_read", since = "CURRENT_RUSTC_VERSION")]
1231+
#[rustc_const_stable(feature = "const_ptr_read", since = "1.71.0")]
12401232
#[inline]
12411233
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
12421234
pub const unsafe fn read_unaligned(self) -> T

‎library/core/src/ptr/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,7 @@ pub const unsafe fn replace<T>(dst: *mut T, mut src: T) -> T {
11391139
/// [valid]: self#safety
11401140
#[inline]
11411141
#[stable(feature = "rust1", since = "1.0.0")]
1142-
#[rustc_const_stable(feature = "const_ptr_read", since = "CURRENT_RUSTC_VERSION")]
1142+
#[rustc_const_stable(feature = "const_ptr_read", since = "1.71.0")]
11431143
#[rustc_allow_const_fn_unstable(const_mut_refs, const_maybe_uninit_as_mut_ptr)]
11441144
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
11451145
pub const unsafe fn read<T>(src: *const T) -> T {
@@ -1256,7 +1256,7 @@ pub const unsafe fn read<T>(src: *const T) -> T {
12561256
/// ```
12571257
#[inline]
12581258
#[stable(feature = "ptr_unaligned", since = "1.17.0")]
1259-
#[rustc_const_stable(feature = "const_ptr_read", since = "CURRENT_RUSTC_VERSION")]
1259+
#[rustc_const_stable(feature = "const_ptr_read", since = "1.71.0")]
12601260
#[rustc_allow_const_fn_unstable(const_mut_refs, const_maybe_uninit_as_mut_ptr)]
12611261
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
12621262
pub const unsafe fn read_unaligned<T>(src: *const T) -> T {

‎library/core/src/ptr/mut_ptr.rs

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -473,20 +473,10 @@ impl<T: ?Sized> *mut T {
473473
where
474474
T: Sized,
475475
{
476-
#[cfg(bootstrap)]
477476
// SAFETY: the caller must uphold the safety contract for `offset`.
478477
// The obtained pointer is valid for writes since the caller must
479478
// guarantee that it points to the same allocated object as `self`.
480-
unsafe {
481-
intrinsics::offset(self, count) as *mut T
482-
}
483-
#[cfg(not(bootstrap))]
484-
// SAFETY: the caller must uphold the safety contract for `offset`.
485-
// The obtained pointer is valid for writes since the caller must
486-
// guarantee that it points to the same allocated object as `self`.
487-
unsafe {
488-
intrinsics::offset(self, count)
489-
}
479+
unsafe { intrinsics::offset(self, count) }
490480
}
491481

492482
/// Calculates the offset from a pointer in bytes.
@@ -1026,16 +1016,8 @@ impl<T: ?Sized> *mut T {
10261016
where
10271017
T: Sized,
10281018
{
1029-
#[cfg(bootstrap)]
1030-
// SAFETY: the caller must uphold the safety contract for `offset`.
1031-
unsafe {
1032-
self.offset(count as isize)
1033-
}
1034-
#[cfg(not(bootstrap))]
10351019
// SAFETY: the caller must uphold the safety contract for `offset`.
1036-
unsafe {
1037-
intrinsics::offset(self, count)
1038-
}
1020+
unsafe { intrinsics::offset(self, count) }
10391021
}
10401022

10411023
/// Calculates the offset from a pointer in bytes (convenience for `.byte_offset(count as isize)`).
@@ -1305,7 +1287,7 @@ impl<T: ?Sized> *mut T {
13051287
///
13061288
/// [`ptr::read`]: crate::ptr::read()
13071289
#[stable(feature = "pointer_methods", since = "1.26.0")]
1308-
#[rustc_const_stable(feature = "const_ptr_read", since = "CURRENT_RUSTC_VERSION")]
1290+
#[rustc_const_stable(feature = "const_ptr_read", since = "1.71.0")]
13091291
#[inline(always)]
13101292
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
13111293
pub const unsafe fn read(self) -> T
@@ -1346,7 +1328,7 @@ impl<T: ?Sized> *mut T {
13461328
///
13471329
/// [`ptr::read_unaligned`]: crate::ptr::read_unaligned()
13481330
#[stable(feature = "pointer_methods", since = "1.26.0")]
1349-
#[rustc_const_stable(feature = "const_ptr_read", since = "CURRENT_RUSTC_VERSION")]
1331+
#[rustc_const_stable(feature = "const_ptr_read", since = "1.71.0")]
13501332
#[inline(always)]
13511333
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
13521334
pub const unsafe fn read_unaligned(self) -> T

‎library/core/src/slice/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1854,7 +1854,7 @@ impl<T> [T] {
18541854
/// }
18551855
/// ```
18561856
#[stable(feature = "rust1", since = "1.0.0")]
1857-
#[rustc_const_stable(feature = "const_slice_split_at_not_mut", since = "CURRENT_RUSTC_VERSION")]
1857+
#[rustc_const_stable(feature = "const_slice_split_at_not_mut", since = "1.71.0")]
18581858
#[rustc_allow_const_fn_unstable(slice_split_at_unchecked)]
18591859
#[inline]
18601860
#[track_caller]

‎library/core/src/tuple.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ macro_rules! tuple_impls {
100100
}
101101
}
102102

103-
#[stable(feature = "array_tuple_conv", since = "CURRENT_RUSTC_VERSION")]
103+
#[stable(feature = "array_tuple_conv", since = "1.71.0")]
104104
impl<T> From<[T; ${count(T)}]> for ($(${ignore(T)} T,)+) {
105105
#[inline]
106106
#[allow(non_snake_case)]
@@ -110,7 +110,7 @@ macro_rules! tuple_impls {
110110
}
111111
}
112112

113-
#[stable(feature = "array_tuple_conv", since = "CURRENT_RUSTC_VERSION")]
113+
#[stable(feature = "array_tuple_conv", since = "1.71.0")]
114114
impl<T> From<($(${ignore(T)} T,)+)> for [T; ${count(T)}] {
115115
#[inline]
116116
#[allow(non_snake_case)]

‎library/core/tests/clone.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#[test]
2-
#[cfg_attr(not(bootstrap), allow(suspicious_double_ref_op))]
2+
#[allow(suspicious_double_ref_op)]
33
fn test_borrowed_clone() {
44
let x = 5;
55
let y: &i32 = &x;

‎library/core/tests/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
#![feature(utf8_chunks)]
110110
#![feature(is_ascii_octdigit)]
111111
#![feature(get_many_mut)]
112-
#![cfg_attr(not(bootstrap), feature(offset_of))]
112+
#![feature(offset_of)]
113113
#![deny(unsafe_op_in_unsafe_fn)]
114114
#![deny(fuzzy_provenance_casts)]
115115

‎library/core/tests/mem.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,6 @@ fn const_maybe_uninit() {
366366
}
367367

368368
#[test]
369-
#[cfg(not(bootstrap))]
370369
fn offset_of() {
371370
#[repr(C)]
372371
struct Foo {
@@ -391,7 +390,7 @@ fn offset_of() {
391390
struct Generic<T> {
392391
x: u8,
393392
y: u32,
394-
z: T
393+
z: T,
395394
}
396395

397396
trait Trait {}
@@ -409,7 +408,6 @@ fn offset_of() {
409408
}
410409

411410
#[test]
412-
#[cfg(not(bootstrap))]
413411
fn offset_of_union() {
414412
#[repr(C)]
415413
union Foo {
@@ -429,7 +427,6 @@ fn offset_of_union() {
429427
}
430428

431429
#[test]
432-
#[cfg(not(bootstrap))]
433430
fn offset_of_dst() {
434431
#[repr(C)]
435432
struct Alpha {
@@ -469,7 +466,6 @@ fn offset_of_dst() {
469466
}
470467

471468
#[test]
472-
#[cfg(not(bootstrap))]
473469
fn offset_of_packed() {
474470
#[repr(C, packed)]
475471
struct Foo {
@@ -482,7 +478,6 @@ fn offset_of_packed() {
482478
}
483479

484480
#[test]
485-
#[cfg(not(bootstrap))]
486481
fn offset_of_projection() {
487482
#[repr(C)]
488483
struct Foo {
@@ -503,7 +498,6 @@ fn offset_of_projection() {
503498
}
504499

505500
#[test]
506-
#[cfg(not(bootstrap))]
507501
fn offset_of_alias() {
508502
#[repr(C)]
509503
struct Foo {
@@ -518,7 +512,6 @@ fn offset_of_alias() {
518512
}
519513

520514
#[test]
521-
#[cfg(not(bootstrap))]
522515
fn const_offset_of() {
523516
#[repr(C)]
524517
struct Foo {
@@ -534,7 +527,6 @@ fn const_offset_of() {
534527
}
535528

536529
#[test]
537-
#[cfg(not(bootstrap))]
538530
fn offset_of_without_const_promotion() {
539531
#[repr(C)]
540532
struct Foo<SuppressConstPromotion> {
@@ -555,7 +547,6 @@ fn offset_of_without_const_promotion() {
555547
}
556548

557549
#[test]
558-
#[cfg(not(bootstrap))]
559550
fn offset_of_addr() {
560551
#[repr(C)]
561552
struct Foo {

‎library/std/src/os/windows/io/handle.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ impl<T: AsHandle> AsHandle for &mut T {
437437
}
438438
}
439439

440-
#[stable(feature = "as_windows_ptrs", since = "CURRENT_RUSTC_VERSION")]
440+
#[stable(feature = "as_windows_ptrs", since = "1.71.0")]
441441
/// This impl allows implementing traits that require `AsHandle` on Arc.
442442
/// ```
443443
/// # #[cfg(windows)] mod group_cfg {
@@ -457,15 +457,15 @@ impl<T: AsHandle> AsHandle for crate::sync::Arc<T> {
457457
}
458458
}
459459

460-
#[stable(feature = "as_windows_ptrs", since = "CURRENT_RUSTC_VERSION")]
460+
#[stable(feature = "as_windows_ptrs", since = "1.71.0")]
461461
impl<T: AsHandle> AsHandle for crate::rc::Rc<T> {
462462
#[inline]
463463
fn as_handle(&self) -> BorrowedHandle<'_> {
464464
(**self).as_handle()
465465
}
466466
}
467467

468-
#[stable(feature = "as_windows_ptrs", since = "CURRENT_RUSTC_VERSION")]
468+
#[stable(feature = "as_windows_ptrs", since = "1.71.0")]
469469
impl<T: AsHandle> AsHandle for Box<T> {
470470
#[inline]
471471
fn as_handle(&self) -> BorrowedHandle<'_> {

‎library/std/src/os/windows/io/socket.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ impl<T: AsSocket> AsSocket for &mut T {
254254
}
255255
}
256256

257-
#[stable(feature = "as_windows_ptrs", since = "CURRENT_RUSTC_VERSION")]
257+
#[stable(feature = "as_windows_ptrs", since = "1.71.0")]
258258
/// This impl allows implementing traits that require `AsSocket` on Arc.
259259
/// ```
260260
/// # #[cfg(windows)] mod group_cfg {
@@ -274,15 +274,15 @@ impl<T: AsSocket> AsSocket for crate::sync::Arc<T> {
274274
}
275275
}
276276

277-
#[stable(feature = "as_windows_ptrs", since = "CURRENT_RUSTC_VERSION")]
277+
#[stable(feature = "as_windows_ptrs", since = "1.71.0")]
278278
impl<T: AsSocket> AsSocket for crate::rc::Rc<T> {
279279
#[inline]
280280
fn as_socket(&self) -> BorrowedSocket<'_> {
281281
(**self).as_socket()
282282
}
283283
}
284284

285-
#[stable(feature = "as_windows_ptrs", since = "CURRENT_RUSTC_VERSION")]
285+
#[stable(feature = "as_windows_ptrs", since = "1.71.0")]
286286
impl<T: AsSocket> AsSocket for Box<T> {
287287
#[inline]
288288
fn as_socket(&self) -> BorrowedSocket<'_> {

‎src/stage0.json

Lines changed: 408 additions & 398 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.