Skip to content

Commit 2054acb

Browse files
authored
Rollup merge of #112103 - Mark-Simulacrum:bootstrap-update, r=clubby789
Bootstrap update to 1.71 beta Best reviewed by-commit.
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).+ $(,)?) {

0 commit comments

Comments
 (0)