diff options
| author | Pietro Albini <pietro@pietroalbini.org> | 2023-12-22 11:14:11 +0100 |
|---|---|---|
| committer | Pietro Albini <pietro@pietroalbini.org> | 2023-12-22 11:14:11 +0100 |
| commit | f9f5840eb4e97fac09348eee0902c1691f042798 (patch) | |
| tree | 5589489ccd92d321200cf1aa26b195f17b9c6e96 /library/core/src/ptr | |
| parent | bcdaa0d19460329a28db9922bb73ce123ffdcf27 (diff) | |
| download | rust-f9f5840eb4e97fac09348eee0902c1691f042798.tar.gz rust-f9f5840eb4e97fac09348eee0902c1691f042798.zip | |
update cfg(bootstrap)s
Diffstat (limited to 'library/core/src/ptr')
| -rw-r--r-- | library/core/src/ptr/const_ptr.rs | 12 | ||||
| -rw-r--r-- | library/core/src/ptr/mod.rs | 2 | ||||
| -rw-r--r-- | library/core/src/ptr/mut_ptr.rs | 12 | ||||
| -rw-r--r-- | library/core/src/ptr/non_null.rs | 2 |
4 files changed, 14 insertions, 14 deletions
diff --git a/library/core/src/ptr/const_ptr.rs b/library/core/src/ptr/const_ptr.rs index a444c30c756..12ff64de879 100644 --- a/library/core/src/ptr/const_ptr.rs +++ b/library/core/src/ptr/const_ptr.rs @@ -1772,7 +1772,7 @@ impl<T> *const [T] { #[stable(feature = "rust1", since = "1.0.0")] impl<T: ?Sized> PartialEq for *const T { #[inline] - #[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))] + #[allow(ambiguous_wide_pointer_comparisons)] fn eq(&self, other: &*const T) -> bool { *self == *other } @@ -1785,7 +1785,7 @@ impl<T: ?Sized> Eq for *const T {} #[stable(feature = "rust1", since = "1.0.0")] impl<T: ?Sized> Ord for *const T { #[inline] - #[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))] + #[allow(ambiguous_wide_pointer_comparisons)] fn cmp(&self, other: &*const T) -> Ordering { if self < other { Less @@ -1805,25 +1805,25 @@ impl<T: ?Sized> PartialOrd for *const T { } #[inline] - #[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))] + #[allow(ambiguous_wide_pointer_comparisons)] fn lt(&self, other: &*const T) -> bool { *self < *other } #[inline] - #[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))] + #[allow(ambiguous_wide_pointer_comparisons)] fn le(&self, other: &*const T) -> bool { *self <= *other } #[inline] - #[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))] + #[allow(ambiguous_wide_pointer_comparisons)] fn gt(&self, other: &*const T) -> bool { *self > *other } #[inline] - #[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))] + #[allow(ambiguous_wide_pointer_comparisons)] fn ge(&self, other: &*const T) -> bool { *self >= *other } diff --git a/library/core/src/ptr/mod.rs b/library/core/src/ptr/mod.rs index 390e0737197..a9078854125 100644 --- a/library/core/src/ptr/mod.rs +++ b/library/core/src/ptr/mod.rs @@ -1900,7 +1900,7 @@ pub(crate) const unsafe fn align_offset<T: Sized>(p: *const T, a: usize) -> usiz #[inline(always)] #[must_use = "pointer comparison produces a value"] #[rustc_diagnostic_item = "ptr_eq"] -#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))] // it's actually clear here +#[allow(ambiguous_wide_pointer_comparisons)] // it's actually clear here pub fn eq<T: ?Sized>(a: *const T, b: *const T) -> bool { a == b } diff --git a/library/core/src/ptr/mut_ptr.rs b/library/core/src/ptr/mut_ptr.rs index 9e7b8ec64ac..4f5fca4367d 100644 --- a/library/core/src/ptr/mut_ptr.rs +++ b/library/core/src/ptr/mut_ptr.rs @@ -2199,7 +2199,7 @@ impl<T> *mut [T] { #[stable(feature = "rust1", since = "1.0.0")] impl<T: ?Sized> PartialEq for *mut T { #[inline(always)] - #[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))] + #[allow(ambiguous_wide_pointer_comparisons)] fn eq(&self, other: &*mut T) -> bool { *self == *other } @@ -2211,7 +2211,7 @@ impl<T: ?Sized> Eq for *mut T {} #[stable(feature = "rust1", since = "1.0.0")] impl<T: ?Sized> Ord for *mut T { #[inline] - #[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))] + #[allow(ambiguous_wide_pointer_comparisons)] fn cmp(&self, other: &*mut T) -> Ordering { if self < other { Less @@ -2231,25 +2231,25 @@ impl<T: ?Sized> PartialOrd for *mut T { } #[inline(always)] - #[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))] + #[allow(ambiguous_wide_pointer_comparisons)] fn lt(&self, other: &*mut T) -> bool { *self < *other } #[inline(always)] - #[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))] + #[allow(ambiguous_wide_pointer_comparisons)] fn le(&self, other: &*mut T) -> bool { *self <= *other } #[inline(always)] - #[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))] + #[allow(ambiguous_wide_pointer_comparisons)] fn gt(&self, other: &*mut T) -> bool { *self > *other } #[inline(always)] - #[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))] + #[allow(ambiguous_wide_pointer_comparisons)] fn ge(&self, other: &*mut T) -> bool { *self >= *other } diff --git a/library/core/src/ptr/non_null.rs b/library/core/src/ptr/non_null.rs index 77961506e13..427a9f3f494 100644 --- a/library/core/src/ptr/non_null.rs +++ b/library/core/src/ptr/non_null.rs @@ -1791,7 +1791,7 @@ impl<T: ?Sized> Eq for NonNull<T> {} #[stable(feature = "nonnull", since = "1.25.0")] impl<T: ?Sized> PartialEq for NonNull<T> { #[inline] - #[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))] + #[allow(ambiguous_wide_pointer_comparisons)] fn eq(&self, other: &Self) -> bool { self.as_ptr() == other.as_ptr() } |
