1
Fork 0

Bump to latest beta

This commit is contained in:
Mark Rousskov 2023-03-07 08:39:30 -05:00
parent 01d7af11e1
commit bb8a0ffa23
11 changed files with 429 additions and 453 deletions

View file

@ -28,7 +28,7 @@ use crate::fmt::{Debug, Display};
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(test), rustc_diagnostic_item = "Error")]
#[rustc_has_incoherent_inherent_impls]
#[cfg_attr(not(bootstrap), allow(multiple_supertrait_upcastable))]
#[allow(multiple_supertrait_upcastable)]
pub trait Error: Debug + Display {
/// The lower-level source of this error, if any.
///

View file

@ -267,7 +267,7 @@ extern "C" {
/// family of functions. It contains a function to format the given value. At
/// compile time it is ensured that the function and the value have the correct
/// types, and then this struct is used to canonicalize arguments to one type.
#[cfg_attr(not(bootstrap), lang = "format_argument")]
#[lang = "format_argument"]
#[derive(Copy, Clone)]
#[allow(missing_debug_implementations)]
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
@ -280,7 +280,7 @@ pub struct ArgumentV1<'a> {
/// This struct represents the unsafety of constructing an `Arguments`.
/// It exists, rather than an unsafe function, in order to simplify the expansion
/// of `format_args!(..)` and reduce the scope of the `unsafe` block.
#[cfg_attr(not(bootstrap), lang = "format_unsafe_arg")]
#[lang = "format_unsafe_arg"]
#[allow(missing_debug_implementations)]
#[doc(hidden)]
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
@ -475,7 +475,7 @@ impl<'a> Arguments<'a> {
/// ```
///
/// [`format()`]: ../../std/fmt/fn.format.html
#[cfg_attr(not(bootstrap), lang = "format_arguments")]
#[lang = "format_arguments"]
#[stable(feature = "rust1", since = "1.0.0")]
#[derive(Copy, Clone)]
pub struct Arguments<'a> {

View file

@ -5,7 +5,7 @@
//! these can be statically allocated and are slightly optimized for the runtime
#![allow(missing_debug_implementations)]
#[cfg_attr(not(bootstrap), lang = "format_placeholder")]
#[lang = "format_placeholder"]
#[derive(Copy, Clone)]
// FIXME: Rename this to Placeholder
pub struct Argument {
@ -37,7 +37,7 @@ impl Argument {
}
/// Possible alignments that can be requested as part of a formatting directive.
#[cfg_attr(not(bootstrap), lang = "format_alignment")]
#[lang = "format_alignment"]
#[derive(Copy, Clone, PartialEq, Eq)]
pub enum Alignment {
/// Indication that contents should be left-aligned.
@ -51,7 +51,7 @@ pub enum Alignment {
}
/// Used by [width](https://doc.rust-lang.org/std/fmt/#width) and [precision](https://doc.rust-lang.org/std/fmt/#precision) specifiers.
#[cfg_attr(not(bootstrap), lang = "format_count")]
#[lang = "format_count"]
#[derive(Copy, Clone)]
pub enum Count {
/// Specified with a literal number, stores the value

View file

@ -278,7 +278,7 @@
//!
//! ```
//! # #![allow(unused_must_use)]
//! # #![cfg_attr(not(bootstrap), allow(map_unit_fn))]
//! # #![allow(map_unit_fn)]
//! let v = vec![1, 2, 3, 4, 5];
//! v.iter().map(|x| println!("{x}"));
//! ```

View file

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

View file

@ -95,7 +95,7 @@
#![warn(missing_docs)]
#![allow(explicit_outlives_requirements)]
#![allow(incomplete_features)]
#![cfg_attr(not(bootstrap), warn(multiple_supertrait_upcastable))]
#![warn(multiple_supertrait_upcastable)]
//
// Library features:
#![feature(const_align_offset)]
@ -241,7 +241,7 @@
#![feature(unsized_fn_params)]
#![feature(asm_const)]
#![feature(const_transmute_copy)]
#![cfg_attr(not(bootstrap), feature(multiple_supertrait_upcastable))]
#![feature(multiple_supertrait_upcastable)]
//
// Target features:
#![feature(arm_target_feature)]
@ -254,7 +254,6 @@
#![feature(sse4a_target_feature)]
#![feature(tbm_target_feature)]
#![feature(wasm_target_feature)]
#![cfg_attr(bootstrap, feature(cmpxchg16b_target_feature))]
// allow using `core::` in intra-doc links
#[allow(unused_extern_crates)]

View file

@ -97,7 +97,7 @@ unsafe impl<T: Sync + ?Sized> Send for &T {}
#[fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable
#[rustc_specialization_trait]
#[rustc_deny_explicit_impl]
#[cfg_attr(not(bootstrap), rustc_coinductive)]
#[rustc_coinductive]
pub trait Sized {
// Empty.
}
@ -877,8 +877,7 @@ pub trait Tuple {}
/// All types that have the same size and alignment as a `usize` or
/// `*const ()` automatically implement this trait.
#[unstable(feature = "pointer_like_trait", issue = "none")]
#[cfg_attr(bootstrap, lang = "pointer_sized")]
#[cfg_attr(not(bootstrap), lang = "pointer_like")]
#[lang = "pointer_like"]
#[rustc_on_unimplemented(
message = "`{Self}` needs to have the same alignment and size as a pointer",
label = "`{Self}` needs to be a pointer-like type"

View file

@ -392,14 +392,7 @@ impl<T> NeverShortCircuit<T> {
pub fn wrap_mut_2<A, B>(
mut f: impl ~const FnMut(A, B) -> T,
) -> impl ~const FnMut(A, B) -> Self {
cfg_if! {
if #[cfg(bootstrap)] {
#[allow(unused_parens)]
(const move |a, b| NeverShortCircuit(f(a, b)))
} else {
const move |a, b| NeverShortCircuit(f(a, b))
}
}
const move |a, b| NeverShortCircuit(f(a, b))
}
}

View file

@ -1951,8 +1951,7 @@ macro_rules! if_not_8_bit {
($_:ident, $($tt:tt)*) => { $($tt)* };
}
#[cfg_attr(not(bootstrap), cfg(target_has_atomic_load_store))]
#[cfg_attr(bootstrap, cfg(target_has_atomic_load_store = "8"))]
#[cfg(target_has_atomic_load_store)]
macro_rules! atomic_int {
($cfg_cas:meta,
$cfg_align:meta,
@ -3125,8 +3124,7 @@ atomic_int_ptr_sized! {
}
#[inline]
#[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
#[cfg(target_has_atomic)]
fn strongest_failure_ordering(order: Ordering) -> Ordering {
match order {
Release => Relaxed,
@ -3168,8 +3166,7 @@ unsafe fn atomic_load<T: Copy>(dst: *const T, order: Ordering) -> T {
}
#[inline]
#[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
#[cfg(target_has_atomic)]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
unsafe fn atomic_swap<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
// 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 {
/// Returns the previous value (like __sync_fetch_and_add).
#[inline]
#[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
#[cfg(target_has_atomic)]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
unsafe fn atomic_add<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
// 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 {
/// Returns the previous value (like __sync_fetch_and_sub).
#[inline]
#[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
#[cfg(target_has_atomic)]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
unsafe fn atomic_sub<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
// 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 {
}
#[inline]
#[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
#[cfg(target_has_atomic)]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
unsafe fn atomic_compare_exchange<T: Copy>(
dst: *mut T,
@ -3257,8 +3251,7 @@ unsafe fn atomic_compare_exchange<T: Copy>(
}
#[inline]
#[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
#[cfg(target_has_atomic)]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
unsafe fn atomic_compare_exchange_weak<T: Copy>(
dst: *mut T,
@ -3293,8 +3286,7 @@ unsafe fn atomic_compare_exchange_weak<T: Copy>(
}
#[inline]
#[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
#[cfg(target_has_atomic)]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
unsafe fn atomic_and<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
// 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 {
}
#[inline]
#[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
#[cfg(target_has_atomic)]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
unsafe fn atomic_nand<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
// 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 {
}
#[inline]
#[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
#[cfg(target_has_atomic)]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
unsafe fn atomic_or<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
// 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 {
}
#[inline]
#[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
#[cfg(target_has_atomic)]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
unsafe fn atomic_xor<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
// 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 {
/// returns the max value (signed comparison)
#[inline]
#[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
#[cfg(target_has_atomic)]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
unsafe fn atomic_max<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
// 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 {
/// returns the min value (signed comparison)
#[inline]
#[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
#[cfg(target_has_atomic)]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
unsafe fn atomic_min<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
// 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 {
/// returns the max value (unsigned comparison)
#[inline]
#[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
#[cfg(target_has_atomic)]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
unsafe fn atomic_umax<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
// 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 {
/// returns the min value (unsigned comparison)
#[inline]
#[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
#[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
#[cfg(target_has_atomic)]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
unsafe fn atomic_umin<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
// SAFETY: the caller must uphold the safety contract for `atomic_umin`