Skip to content

Commit 42746f7

Browse files
committed
Auto merge of rust-lang#119211 - rust-lang:pa-master-1.77, r=Mark-Simulacrum
Bump stage0 to 1.76 beta r? `@Mark-Simulacrum`
2 parents 09514f4 + 7f1eb90 commit 42746f7

File tree

16 files changed

+33
-187
lines changed

16 files changed

+33
-187
lines changed

alloc/src/rc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1768,7 +1768,7 @@ impl<T: Clone, A: Allocator + Clone> Rc<T, A> {
17681768
/// assert!(ptr::eq(ptr, inner.as_ptr()));
17691769
/// ```
17701770
#[inline]
1771-
#[stable(feature = "arc_unwrap_or_clone", since = "CURRENT_RUSTC_VERSION")]
1771+
#[stable(feature = "arc_unwrap_or_clone", since = "1.76.0")]
17721772
pub fn unwrap_or_clone(this: Self) -> T {
17731773
Rc::try_unwrap(this).unwrap_or_else(|rc| (*rc).clone())
17741774
}

alloc/src/sync.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2194,7 +2194,7 @@ impl<T: Clone, A: Allocator + Clone> Arc<T, A> {
21942194
/// assert!(ptr::eq(ptr, inner.as_ptr()));
21952195
/// ```
21962196
#[inline]
2197-
#[stable(feature = "arc_unwrap_or_clone", since = "CURRENT_RUSTC_VERSION")]
2197+
#[stable(feature = "arc_unwrap_or_clone", since = "1.76.0")]
21982198
pub fn unwrap_or_clone(this: Self) -> T {
21992199
Arc::try_unwrap(this).unwrap_or_else(|arc| (*arc).clone())
22002200
}

core/src/any.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ pub const fn type_name<T: ?Sized>() -> &'static str {
729729
/// assert!(type_name_of_val(&y).contains("f32"));
730730
/// ```
731731
#[must_use]
732-
#[stable(feature = "type_name_of_val", since = "CURRENT_RUSTC_VERSION")]
732+
#[stable(feature = "type_name_of_val", since = "1.76.0")]
733733
#[rustc_const_unstable(feature = "const_type_name", issue = "63084")]
734734
pub const fn type_name_of_val<T: ?Sized>(_val: &T) -> &'static str {
735735
type_name::<T>()

core/src/async_iter/async_iter.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use crate::task::{Context, Poll};
1313
#[unstable(feature = "async_iterator", issue = "79024")]
1414
#[must_use = "async iterators do nothing unless polled"]
1515
#[doc(alias = "Stream")]
16-
#[cfg_attr(not(bootstrap), lang = "async_iterator")]
16+
#[lang = "async_iterator"]
1717
pub trait AsyncIterator {
1818
/// The type of items yielded by the async iterator.
1919
type Item;
@@ -117,21 +117,21 @@ impl<T> Poll<Option<T>> {
117117
/// A helper function for internal desugaring -- produces `Ready(Some(t))`,
118118
/// which corresponds to the async iterator yielding a value.
119119
#[unstable(feature = "async_gen_internals", issue = "none")]
120-
#[cfg_attr(not(bootstrap), lang = "AsyncGenReady")]
120+
#[lang = "AsyncGenReady"]
121121
pub fn async_gen_ready(t: T) -> Self {
122122
Poll::Ready(Some(t))
123123
}
124124

125125
/// A helper constant for internal desugaring -- produces `Pending`,
126126
/// which corresponds to the async iterator pending on an `.await`.
127127
#[unstable(feature = "async_gen_internals", issue = "none")]
128-
#[cfg_attr(not(bootstrap), lang = "AsyncGenPending")]
128+
#[lang = "AsyncGenPending"]
129129
// FIXME(gen_blocks): This probably could be deduplicated.
130130
pub const PENDING: Self = Poll::Pending;
131131

132132
/// A helper constant for internal desugaring -- produces `Ready(None)`,
133133
/// which corresponds to the async iterator finishing its iteration.
134134
#[unstable(feature = "async_gen_internals", issue = "none")]
135-
#[cfg_attr(not(bootstrap), lang = "AsyncGenFinished")]
135+
#[lang = "AsyncGenFinished"]
136136
pub const FINISHED: Self = Poll::Ready(None);
137137
}

core/src/cmp.rs

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -224,21 +224,21 @@ use self::Ordering::*;
224224
append_const_msg
225225
)]
226226
#[rustc_diagnostic_item = "PartialEq"]
227-
#[cfg_attr(not(bootstrap), const_trait)]
227+
#[const_trait]
228228
pub trait PartialEq<Rhs: ?Sized = Self> {
229229
/// This method tests for `self` and `other` values to be equal, and is used
230230
/// by `==`.
231231
#[must_use]
232232
#[stable(feature = "rust1", since = "1.0.0")]
233-
#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "cmp_partialeq_eq")]
233+
#[rustc_diagnostic_item = "cmp_partialeq_eq"]
234234
fn eq(&self, other: &Rhs) -> bool;
235235

236236
/// This method tests for `!=`. The default implementation is almost always
237237
/// sufficient, and should not be overridden without very good reason.
238238
#[inline]
239239
#[must_use]
240240
#[stable(feature = "rust1", since = "1.0.0")]
241-
#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "cmp_partialeq_ne")]
241+
#[rustc_diagnostic_item = "cmp_partialeq_ne"]
242242
fn ne(&self, other: &Rhs) -> bool {
243243
!self.eq(other)
244244
}
@@ -1416,18 +1416,8 @@ mod impls {
14161416

14171417
macro_rules! partial_eq_impl {
14181418
($($t:ty)*) => ($(
1419-
#[stable(feature = "rust1", since = "1.0.0")]
1420-
#[cfg(bootstrap)]
1421-
impl PartialEq for $t {
1422-
#[inline]
1423-
fn eq(&self, other: &$t) -> bool { (*self) == (*other) }
1424-
#[inline]
1425-
fn ne(&self, other: &$t) -> bool { (*self) != (*other) }
1426-
}
1427-
14281419
#[stable(feature = "rust1", since = "1.0.0")]
14291420
#[rustc_const_unstable(feature = "const_cmp", issue = "92391")]
1430-
#[cfg(not(bootstrap))]
14311421
impl const PartialEq for $t {
14321422
#[inline]
14331423
fn eq(&self, other: &$t) -> bool { (*self) == (*other) }

core/src/intrinsics/simd.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ extern "platform-intrinsic" {
257257
/// type).
258258
///
259259
/// `mask` must only contain `0` or `!0` values.
260-
#[cfg(not(bootstrap))]
261260
pub fn simd_masked_load<V, U, T>(mask: V, ptr: U, val: T) -> T;
262261

263262
/// Write to a vector of pointers.
@@ -277,7 +276,6 @@ extern "platform-intrinsic" {
277276
/// type).
278277
///
279278
/// `mask` must only contain `0` or `!0` values.
280-
#[cfg(not(bootstrap))]
281279
pub fn simd_masked_store<V, U, T>(mask: V, ptr: U, val: T);
282280

283281
/// Add two simd vectors elementwise, with saturation.

core/src/option.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,7 @@ impl<T> Option<T> {
10881088
/// let x: Option<&usize> = v.get(5).inspect(|x| println!("got: {x}"));
10891089
/// ```
10901090
#[inline]
1091-
#[stable(feature = "result_option_inspect", since = "CURRENT_RUSTC_VERSION")]
1091+
#[stable(feature = "result_option_inspect", since = "1.76.0")]
10921092
pub fn inspect<F: FnOnce(&T)>(self, f: F) -> Self {
10931093
if let Some(ref x) = self {
10941094
f(x);

core/src/ptr/const_ptr.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1772,7 +1772,7 @@ impl<T> *const [T] {
17721772
#[stable(feature = "rust1", since = "1.0.0")]
17731773
impl<T: ?Sized> PartialEq for *const T {
17741774
#[inline]
1775-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
1775+
#[allow(ambiguous_wide_pointer_comparisons)]
17761776
fn eq(&self, other: &*const T) -> bool {
17771777
*self == *other
17781778
}
@@ -1785,7 +1785,7 @@ impl<T: ?Sized> Eq for *const T {}
17851785
#[stable(feature = "rust1", since = "1.0.0")]
17861786
impl<T: ?Sized> Ord for *const T {
17871787
#[inline]
1788-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
1788+
#[allow(ambiguous_wide_pointer_comparisons)]
17891789
fn cmp(&self, other: &*const T) -> Ordering {
17901790
if self < other {
17911791
Less
@@ -1805,25 +1805,25 @@ impl<T: ?Sized> PartialOrd for *const T {
18051805
}
18061806

18071807
#[inline]
1808-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
1808+
#[allow(ambiguous_wide_pointer_comparisons)]
18091809
fn lt(&self, other: &*const T) -> bool {
18101810
*self < *other
18111811
}
18121812

18131813
#[inline]
1814-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
1814+
#[allow(ambiguous_wide_pointer_comparisons)]
18151815
fn le(&self, other: &*const T) -> bool {
18161816
*self <= *other
18171817
}
18181818

18191819
#[inline]
1820-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
1820+
#[allow(ambiguous_wide_pointer_comparisons)]
18211821
fn gt(&self, other: &*const T) -> bool {
18221822
*self > *other
18231823
}
18241824

18251825
#[inline]
1826-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
1826+
#[allow(ambiguous_wide_pointer_comparisons)]
18271827
fn ge(&self, other: &*const T) -> bool {
18281828
*self >= *other
18291829
}

core/src/ptr/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -720,8 +720,8 @@ where
720720
/// type or mutability, in particular if the code is refactored.
721721
#[inline(always)]
722722
#[must_use]
723-
#[stable(feature = "ptr_from_ref", since = "CURRENT_RUSTC_VERSION")]
724-
#[rustc_const_stable(feature = "ptr_from_ref", since = "CURRENT_RUSTC_VERSION")]
723+
#[stable(feature = "ptr_from_ref", since = "1.76.0")]
724+
#[rustc_const_stable(feature = "ptr_from_ref", since = "1.76.0")]
725725
#[rustc_never_returns_null_ptr]
726726
#[rustc_diagnostic_item = "ptr_from_ref"]
727727
pub const fn from_ref<T: ?Sized>(r: &T) -> *const T {
@@ -734,8 +734,8 @@ pub const fn from_ref<T: ?Sized>(r: &T) -> *const T {
734734
/// type or mutability, in particular if the code is refactored.
735735
#[inline(always)]
736736
#[must_use]
737-
#[stable(feature = "ptr_from_ref", since = "CURRENT_RUSTC_VERSION")]
738-
#[rustc_const_stable(feature = "ptr_from_ref", since = "CURRENT_RUSTC_VERSION")]
737+
#[stable(feature = "ptr_from_ref", since = "1.76.0")]
738+
#[rustc_const_stable(feature = "ptr_from_ref", since = "1.76.0")]
739739
#[rustc_allow_const_fn_unstable(const_mut_refs)]
740740
#[rustc_never_returns_null_ptr]
741741
pub const fn from_mut<T: ?Sized>(r: &mut T) -> *mut T {
@@ -1900,7 +1900,7 @@ pub(crate) const unsafe fn align_offset<T: Sized>(p: *const T, a: usize) -> usiz
19001900
#[inline(always)]
19011901
#[must_use = "pointer comparison produces a value"]
19021902
#[rustc_diagnostic_item = "ptr_eq"]
1903-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))] // it's actually clear here
1903+
#[allow(ambiguous_wide_pointer_comparisons)] // it's actually clear here
19041904
pub fn eq<T: ?Sized>(a: *const T, b: *const T) -> bool {
19051905
a == b
19061906
}
@@ -1922,7 +1922,7 @@ pub fn eq<T: ?Sized>(a: *const T, b: *const T) -> bool {
19221922
/// assert!(ptr::addr_eq(whole, first));
19231923
/// assert!(!ptr::eq::<dyn std::fmt::Debug>(whole, first));
19241924
/// ```
1925-
#[stable(feature = "ptr_addr_eq", since = "CURRENT_RUSTC_VERSION")]
1925+
#[stable(feature = "ptr_addr_eq", since = "1.76.0")]
19261926
#[inline(always)]
19271927
#[must_use = "pointer comparison produces a value"]
19281928
pub fn addr_eq<T: ?Sized, U: ?Sized>(p: *const T, q: *const U) -> bool {

core/src/ptr/mut_ptr.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2199,7 +2199,7 @@ impl<T> *mut [T] {
21992199
#[stable(feature = "rust1", since = "1.0.0")]
22002200
impl<T: ?Sized> PartialEq for *mut T {
22012201
#[inline(always)]
2202-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
2202+
#[allow(ambiguous_wide_pointer_comparisons)]
22032203
fn eq(&self, other: &*mut T) -> bool {
22042204
*self == *other
22052205
}
@@ -2211,7 +2211,7 @@ impl<T: ?Sized> Eq for *mut T {}
22112211
#[stable(feature = "rust1", since = "1.0.0")]
22122212
impl<T: ?Sized> Ord for *mut T {
22132213
#[inline]
2214-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
2214+
#[allow(ambiguous_wide_pointer_comparisons)]
22152215
fn cmp(&self, other: &*mut T) -> Ordering {
22162216
if self < other {
22172217
Less
@@ -2231,25 +2231,25 @@ impl<T: ?Sized> PartialOrd for *mut T {
22312231
}
22322232

22332233
#[inline(always)]
2234-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
2234+
#[allow(ambiguous_wide_pointer_comparisons)]
22352235
fn lt(&self, other: &*mut T) -> bool {
22362236
*self < *other
22372237
}
22382238

22392239
#[inline(always)]
2240-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
2240+
#[allow(ambiguous_wide_pointer_comparisons)]
22412241
fn le(&self, other: &*mut T) -> bool {
22422242
*self <= *other
22432243
}
22442244

22452245
#[inline(always)]
2246-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
2246+
#[allow(ambiguous_wide_pointer_comparisons)]
22472247
fn gt(&self, other: &*mut T) -> bool {
22482248
*self > *other
22492249
}
22502250

22512251
#[inline(always)]
2252-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
2252+
#[allow(ambiguous_wide_pointer_comparisons)]
22532253
fn ge(&self, other: &*mut T) -> bool {
22542254
*self >= *other
22552255
}

0 commit comments

Comments
 (0)