Skip to content

Commit

Permalink
Bump to latest beta
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-Simulacrum committed Mar 15, 2023
1 parent 01d7af1 commit bb8a0ff
Show file tree
Hide file tree
Showing 11 changed files with 429 additions and 453 deletions.
4 changes: 2 additions & 2 deletions library/alloc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
#![warn(missing_debug_implementations)]
#![warn(missing_docs)]
#![allow(explicit_outlives_requirements)]
#![cfg_attr(not(bootstrap), warn(multiple_supertrait_upcastable))]
#![warn(multiple_supertrait_upcastable)]
//
// Library features:
#![feature(alloc_layout_extra)]
Expand Down Expand Up @@ -195,7 +195,7 @@
#![feature(c_unwind)]
#![feature(with_negative_coherence)]
#![cfg_attr(test, feature(panic_update_hook))]
#![cfg_attr(not(bootstrap), feature(multiple_supertrait_upcastable))]
#![feature(multiple_supertrait_upcastable)]
//
// Rustdoc features:
#![feature(doc_cfg)]
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down
6 changes: 3 additions & 3 deletions library/core/src/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand All @@ -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")]
Expand Down Expand Up @@ -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> {
Expand Down
6 changes: 3 additions & 3 deletions library/core/src/fmt/rt/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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.
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/iter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}"));
//! ```
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/iter/traits/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
5 changes: 2 additions & 3 deletions library/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down Expand Up @@ -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)]
Expand All @@ -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)]
Expand Down
5 changes: 2 additions & 3 deletions library/core/src/marker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}
Expand Down Expand Up @@ -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"
Expand Down
9 changes: 1 addition & 8 deletions library/core/src/ops/try_trait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}

Expand Down
45 changes: 15 additions & 30 deletions library/core/src/sync/atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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`.
Expand All @@ -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`.
Expand All @@ -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`.
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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`
Expand All @@ -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`
Expand All @@ -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`
Expand All @@ -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`
Expand All @@ -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`
Expand All @@ -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`
Expand All @@ -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`
Expand All @@ -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`
Expand Down
Loading

0 comments on commit bb8a0ff

Please sign in to comment.