Skip to content

Commit bb8a0ff

Browse files
Bump to latest beta
1 parent 01d7af1 commit bb8a0ff

File tree

11 files changed

+429
-453
lines changed

11 files changed

+429
-453
lines changed

library/alloc/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
#![warn(missing_debug_implementations)]
8888
#![warn(missing_docs)]
8989
#![allow(explicit_outlives_requirements)]
90-
#![cfg_attr(not(bootstrap), warn(multiple_supertrait_upcastable))]
90+
#![warn(multiple_supertrait_upcastable)]
9191
//
9292
// Library features:
9393
#![feature(alloc_layout_extra)]
@@ -195,7 +195,7 @@
195195
#![feature(c_unwind)]
196196
#![feature(with_negative_coherence)]
197197
#![cfg_attr(test, feature(panic_update_hook))]
198-
#![cfg_attr(not(bootstrap), feature(multiple_supertrait_upcastable))]
198+
#![feature(multiple_supertrait_upcastable)]
199199
//
200200
// Rustdoc features:
201201
#![feature(doc_cfg)]

library/core/src/error.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use crate::fmt::{Debug, Display};
2828
#[stable(feature = "rust1", since = "1.0.0")]
2929
#[cfg_attr(not(test), rustc_diagnostic_item = "Error")]
3030
#[rustc_has_incoherent_inherent_impls]
31-
#[cfg_attr(not(bootstrap), allow(multiple_supertrait_upcastable))]
31+
#[allow(multiple_supertrait_upcastable)]
3232
pub trait Error: Debug + Display {
3333
/// The lower-level source of this error, if any.
3434
///

library/core/src/fmt/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ extern "C" {
267267
/// family of functions. It contains a function to format the given value. At
268268
/// compile time it is ensured that the function and the value have the correct
269269
/// types, and then this struct is used to canonicalize arguments to one type.
270-
#[cfg_attr(not(bootstrap), lang = "format_argument")]
270+
#[lang = "format_argument"]
271271
#[derive(Copy, Clone)]
272272
#[allow(missing_debug_implementations)]
273273
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
@@ -280,7 +280,7 @@ pub struct ArgumentV1<'a> {
280280
/// This struct represents the unsafety of constructing an `Arguments`.
281281
/// It exists, rather than an unsafe function, in order to simplify the expansion
282282
/// of `format_args!(..)` and reduce the scope of the `unsafe` block.
283-
#[cfg_attr(not(bootstrap), lang = "format_unsafe_arg")]
283+
#[lang = "format_unsafe_arg"]
284284
#[allow(missing_debug_implementations)]
285285
#[doc(hidden)]
286286
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
@@ -475,7 +475,7 @@ impl<'a> Arguments<'a> {
475475
/// ```
476476
///
477477
/// [`format()`]: ../../std/fmt/fn.format.html
478-
#[cfg_attr(not(bootstrap), lang = "format_arguments")]
478+
#[lang = "format_arguments"]
479479
#[stable(feature = "rust1", since = "1.0.0")]
480480
#[derive(Copy, Clone)]
481481
pub struct Arguments<'a> {

library/core/src/fmt/rt/v1.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//! these can be statically allocated and are slightly optimized for the runtime
66
#![allow(missing_debug_implementations)]
77

8-
#[cfg_attr(not(bootstrap), lang = "format_placeholder")]
8+
#[lang = "format_placeholder"]
99
#[derive(Copy, Clone)]
1010
// FIXME: Rename this to Placeholder
1111
pub struct Argument {
@@ -37,7 +37,7 @@ impl Argument {
3737
}
3838

3939
/// Possible alignments that can be requested as part of a formatting directive.
40-
#[cfg_attr(not(bootstrap), lang = "format_alignment")]
40+
#[lang = "format_alignment"]
4141
#[derive(Copy, Clone, PartialEq, Eq)]
4242
pub enum Alignment {
4343
/// Indication that contents should be left-aligned.
@@ -51,7 +51,7 @@ pub enum Alignment {
5151
}
5252

5353
/// Used by [width](https://doc.rust-lang.org/std/fmt/#width) and [precision](https://doc.rust-lang.org/std/fmt/#precision) specifiers.
54-
#[cfg_attr(not(bootstrap), lang = "format_count")]
54+
#[lang = "format_count"]
5555
#[derive(Copy, Clone)]
5656
pub enum Count {
5757
/// Specified with a literal number, stores the value

library/core/src/iter/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@
278278
//!
279279
//! ```
280280
//! # #![allow(unused_must_use)]
281-
//! # #![cfg_attr(not(bootstrap), allow(map_unit_fn))]
281+
//! # #![allow(map_unit_fn)]
282282
//! let v = vec![1, 2, 3, 4, 5];
283283
//! v.iter().map(|x| println!("{x}"));
284284
//! ```

library/core/src/iter/traits/iterator.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ fn _assert_is_object_safe(_: &dyn Iterator<Item = ()>) {}
6969
#[doc(notable_trait)]
7070
#[rustc_diagnostic_item = "Iterator"]
7171
#[must_use = "iterators are lazy and do nothing unless consumed"]
72-
#[cfg_attr(not(bootstrap), const_trait)]
72+
#[const_trait]
7373
pub trait Iterator {
7474
/// The type of the elements being iterated over.
7575
#[rustc_diagnostic_item = "IteratorItem"]

library/core/src/lib.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
#![warn(missing_docs)]
9696
#![allow(explicit_outlives_requirements)]
9797
#![allow(incomplete_features)]
98-
#![cfg_attr(not(bootstrap), warn(multiple_supertrait_upcastable))]
98+
#![warn(multiple_supertrait_upcastable)]
9999
//
100100
// Library features:
101101
#![feature(const_align_offset)]
@@ -241,7 +241,7 @@
241241
#![feature(unsized_fn_params)]
242242
#![feature(asm_const)]
243243
#![feature(const_transmute_copy)]
244-
#![cfg_attr(not(bootstrap), feature(multiple_supertrait_upcastable))]
244+
#![feature(multiple_supertrait_upcastable)]
245245
//
246246
// Target features:
247247
#![feature(arm_target_feature)]
@@ -254,7 +254,6 @@
254254
#![feature(sse4a_target_feature)]
255255
#![feature(tbm_target_feature)]
256256
#![feature(wasm_target_feature)]
257-
#![cfg_attr(bootstrap, feature(cmpxchg16b_target_feature))]
258257

259258
// allow using `core::` in intra-doc links
260259
#[allow(unused_extern_crates)]

library/core/src/marker.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ unsafe impl<T: Sync + ?Sized> Send for &T {}
9797
#[fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable
9898
#[rustc_specialization_trait]
9999
#[rustc_deny_explicit_impl]
100-
#[cfg_attr(not(bootstrap), rustc_coinductive)]
100+
#[rustc_coinductive]
101101
pub trait Sized {
102102
// Empty.
103103
}
@@ -877,8 +877,7 @@ pub trait Tuple {}
877877
/// All types that have the same size and alignment as a `usize` or
878878
/// `*const ()` automatically implement this trait.
879879
#[unstable(feature = "pointer_like_trait", issue = "none")]
880-
#[cfg_attr(bootstrap, lang = "pointer_sized")]
881-
#[cfg_attr(not(bootstrap), lang = "pointer_like")]
880+
#[lang = "pointer_like"]
882881
#[rustc_on_unimplemented(
883882
message = "`{Self}` needs to have the same alignment and size as a pointer",
884883
label = "`{Self}` needs to be a pointer-like type"

library/core/src/ops/try_trait.rs

+1-8
Original file line numberDiff line numberDiff line change
@@ -392,14 +392,7 @@ impl<T> NeverShortCircuit<T> {
392392
pub fn wrap_mut_2<A, B>(
393393
mut f: impl ~const FnMut(A, B) -> T,
394394
) -> impl ~const FnMut(A, B) -> Self {
395-
cfg_if! {
396-
if #[cfg(bootstrap)] {
397-
#[allow(unused_parens)]
398-
(const move |a, b| NeverShortCircuit(f(a, b)))
399-
} else {
400-
const move |a, b| NeverShortCircuit(f(a, b))
401-
}
402-
}
395+
const move |a, b| NeverShortCircuit(f(a, b))
403396
}
404397
}
405398

library/core/src/sync/atomic.rs

+15-30
Original file line numberDiff line numberDiff line change
@@ -1951,8 +1951,7 @@ macro_rules! if_not_8_bit {
19511951
($_:ident, $($tt:tt)*) => { $($tt)* };
19521952
}
19531953

1954-
#[cfg_attr(not(bootstrap), cfg(target_has_atomic_load_store))]
1955-
#[cfg_attr(bootstrap, cfg(target_has_atomic_load_store = "8"))]
1954+
#[cfg(target_has_atomic_load_store)]
19561955
macro_rules! atomic_int {
19571956
($cfg_cas:meta,
19581957
$cfg_align:meta,
@@ -3125,8 +3124,7 @@ atomic_int_ptr_sized! {
31253124
}
31263125

31273126
#[inline]
3128-
#[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
3129-
#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
3127+
#[cfg(target_has_atomic)]
31303128
fn strongest_failure_ordering(order: Ordering) -> Ordering {
31313129
match order {
31323130
Release => Relaxed,
@@ -3168,8 +3166,7 @@ unsafe fn atomic_load<T: Copy>(dst: *const T, order: Ordering) -> T {
31683166
}
31693167

31703168
#[inline]
3171-
#[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
3172-
#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
3169+
#[cfg(target_has_atomic)]
31733170
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
31743171
unsafe fn atomic_swap<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
31753172
// SAFETY: the caller must uphold the safety contract for `atomic_swap`.
@@ -3186,8 +3183,7 @@ unsafe fn atomic_swap<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
31863183

31873184
/// Returns the previous value (like __sync_fetch_and_add).
31883185
#[inline]
3189-
#[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
3190-
#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
3186+
#[cfg(target_has_atomic)]
31913187
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
31923188
unsafe fn atomic_add<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
31933189
// SAFETY: the caller must uphold the safety contract for `atomic_add`.
@@ -3204,8 +3200,7 @@ unsafe fn atomic_add<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
32043200

32053201
/// Returns the previous value (like __sync_fetch_and_sub).
32063202
#[inline]
3207-
#[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
3208-
#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
3203+
#[cfg(target_has_atomic)]
32093204
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
32103205
unsafe fn atomic_sub<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
32113206
// SAFETY: the caller must uphold the safety contract for `atomic_sub`.
@@ -3221,8 +3216,7 @@ unsafe fn atomic_sub<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
32213216
}
32223217

32233218
#[inline]
3224-
#[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
3225-
#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
3219+
#[cfg(target_has_atomic)]
32263220
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
32273221
unsafe fn atomic_compare_exchange<T: Copy>(
32283222
dst: *mut T,
@@ -3257,8 +3251,7 @@ unsafe fn atomic_compare_exchange<T: Copy>(
32573251
}
32583252

32593253
#[inline]
3260-
#[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
3261-
#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
3254+
#[cfg(target_has_atomic)]
32623255
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
32633256
unsafe fn atomic_compare_exchange_weak<T: Copy>(
32643257
dst: *mut T,
@@ -3293,8 +3286,7 @@ unsafe fn atomic_compare_exchange_weak<T: Copy>(
32933286
}
32943287

32953288
#[inline]
3296-
#[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
3297-
#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
3289+
#[cfg(target_has_atomic)]
32983290
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
32993291
unsafe fn atomic_and<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
33003292
// SAFETY: the caller must uphold the safety contract for `atomic_and`
@@ -3310,8 +3302,7 @@ unsafe fn atomic_and<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
33103302
}
33113303

33123304
#[inline]
3313-
#[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
3314-
#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
3305+
#[cfg(target_has_atomic)]
33153306
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
33163307
unsafe fn atomic_nand<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
33173308
// SAFETY: the caller must uphold the safety contract for `atomic_nand`
@@ -3327,8 +3318,7 @@ unsafe fn atomic_nand<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
33273318
}
33283319

33293320
#[inline]
3330-
#[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
3331-
#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
3321+
#[cfg(target_has_atomic)]
33323322
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
33333323
unsafe fn atomic_or<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
33343324
// SAFETY: the caller must uphold the safety contract for `atomic_or`
@@ -3344,8 +3334,7 @@ unsafe fn atomic_or<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
33443334
}
33453335

33463336
#[inline]
3347-
#[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
3348-
#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
3337+
#[cfg(target_has_atomic)]
33493338
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
33503339
unsafe fn atomic_xor<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
33513340
// SAFETY: the caller must uphold the safety contract for `atomic_xor`
@@ -3362,8 +3351,7 @@ unsafe fn atomic_xor<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
33623351

33633352
/// returns the max value (signed comparison)
33643353
#[inline]
3365-
#[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
3366-
#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
3354+
#[cfg(target_has_atomic)]
33673355
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
33683356
unsafe fn atomic_max<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
33693357
// SAFETY: the caller must uphold the safety contract for `atomic_max`
@@ -3380,8 +3368,7 @@ unsafe fn atomic_max<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
33803368

33813369
/// returns the min value (signed comparison)
33823370
#[inline]
3383-
#[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
3384-
#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
3371+
#[cfg(target_has_atomic)]
33853372
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
33863373
unsafe fn atomic_min<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
33873374
// SAFETY: the caller must uphold the safety contract for `atomic_min`
@@ -3398,8 +3385,7 @@ unsafe fn atomic_min<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
33983385

33993386
/// returns the max value (unsigned comparison)
34003387
#[inline]
3401-
#[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
3402-
#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
3388+
#[cfg(target_has_atomic)]
34033389
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
34043390
unsafe fn atomic_umax<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
34053391
// SAFETY: the caller must uphold the safety contract for `atomic_umax`
@@ -3416,8 +3402,7 @@ unsafe fn atomic_umax<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
34163402

34173403
/// returns the min value (unsigned comparison)
34183404
#[inline]
3419-
#[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
3420-
#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
3405+
#[cfg(target_has_atomic)]
34213406
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
34223407
unsafe fn atomic_umin<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
34233408
// SAFETY: the caller must uphold the safety contract for `atomic_umin`

0 commit comments

Comments
 (0)