diff options
| author | Pietro Albini <pietro@pietroalbini.org> | 2019-01-17 10:48:10 +0100 |
|---|---|---|
| committer | Pietro Albini <pietro@pietroalbini.org> | 2019-01-17 10:48:10 +0100 |
| commit | d158ef64e820041110bc5519abb9012010cc2cf0 (patch) | |
| tree | f350478ce1c491f53c6fe55bd8a0fc98c2cc37e9 /src/libcore | |
| parent | 722b4d695964906807b12379577bce5ee3d23e08 (diff) | |
| download | rust-d158ef64e820041110bc5519abb9012010cc2cf0.tar.gz rust-d158ef64e820041110bc5519abb9012010cc2cf0.zip | |
Revert "Auto merge of #57670 - rust-lang:beta-next, r=Mark-Simulacrum"
This reverts commit 722b4d695964906807b12379577bce5ee3d23e08, reversing changes made to 956dba47d33fc8b2bdabcd50e5bfed264b570382.
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/num/mod.rs | 4 | ||||
| -rw-r--r-- | src/libcore/ptr.rs | 16 |
2 files changed, 0 insertions, 20 deletions
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 3a3fd27d525..6827364c0f8 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -47,8 +47,6 @@ assert_eq!(size_of::<Option<std::num::", stringify!($Ty), ">>(), size_of::<", st #[stable(feature = "nonzero", since = "1.28.0")] #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] #[repr(transparent)] - // FIXME: the rustc_layout_scalar_valid_range_start attr is marked as unused - #[cfg_attr(stage0, allow(unused_attributes))] #[rustc_layout_scalar_valid_range_start(1)] pub struct $Ty($Int); } @@ -70,8 +68,6 @@ assert_eq!(size_of::<Option<std::num::", stringify!($Ty), ">>(), size_of::<", st #[inline] pub fn new(n: $Int) -> Option<Self> { if n != 0 { - // FIXME: this unsafe block is actually needed - #[cfg_attr(stage0, allow(unused_unsafe))] Some(unsafe { $Ty(n) }) } else { None diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index 979a7b231ec..02eef07afd7 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -2718,8 +2718,6 @@ impl<T: ?Sized> PartialOrd for *mut T { (if you also use #[may_dangle]), Send, and/or Sync")] #[doc(hidden)] #[repr(transparent)] -// FIXME: the rustc_layout_scalar_valid_range_start attr is marked as unused -#[cfg_attr(stage0, allow(unused_attributes))] #[rustc_layout_scalar_valid_range_start(1)] pub struct Unique<T: ?Sized> { pointer: *const T, @@ -2785,8 +2783,6 @@ impl<T: ?Sized> Unique<T> { /// Creates a new `Unique` if `ptr` is non-null. pub fn new(ptr: *mut T) -> Option<Self> { if !ptr.is_null() { - // FIXME: this unsafe block is actually needed - #[cfg_attr(stage0, allow(unused_unsafe))] Some(unsafe { Unique { pointer: ptr as _, _marker: PhantomData } }) } else { None @@ -2843,8 +2839,6 @@ impl<T: ?Sized> fmt::Pointer for Unique<T> { #[unstable(feature = "ptr_internals", issue = "0")] impl<'a, T: ?Sized> From<&'a mut T> for Unique<T> { fn from(reference: &'a mut T) -> Self { - // FIXME: this unsafe block is actually needed - #[cfg_attr(stage0, allow(unused_unsafe))] unsafe { Unique { pointer: reference as *mut T, _marker: PhantomData } } } } @@ -2852,8 +2846,6 @@ impl<'a, T: ?Sized> From<&'a mut T> for Unique<T> { #[unstable(feature = "ptr_internals", issue = "0")] impl<'a, T: ?Sized> From<&'a T> for Unique<T> { fn from(reference: &'a T) -> Self { - // FIXME: this unsafe block is actually needed - #[cfg_attr(stage0, allow(unused_unsafe))] unsafe { Unique { pointer: reference as *const T, _marker: PhantomData } } } } @@ -2861,8 +2853,6 @@ impl<'a, T: ?Sized> From<&'a T> for Unique<T> { #[unstable(feature = "ptr_internals", issue = "0")] impl<'a, T: ?Sized> From<NonNull<T>> for Unique<T> { fn from(p: NonNull<T>) -> Self { - // FIXME: this unsafe block is actually needed - #[cfg_attr(stage0, allow(unused_unsafe))] unsafe { Unique { pointer: p.pointer, _marker: PhantomData } } } } @@ -3052,8 +3042,6 @@ impl<T: ?Sized> hash::Hash for NonNull<T> { impl<T: ?Sized> From<Unique<T>> for NonNull<T> { #[inline] fn from(unique: Unique<T>) -> Self { - // FIXME: this unsafe block is actually needed - #[cfg_attr(stage0, allow(unused_unsafe))] unsafe { NonNull { pointer: unique.pointer } } } } @@ -3062,8 +3050,6 @@ impl<T: ?Sized> From<Unique<T>> for NonNull<T> { impl<'a, T: ?Sized> From<&'a mut T> for NonNull<T> { #[inline] fn from(reference: &'a mut T) -> Self { - // FIXME: this unsafe block is actually needed - #[cfg_attr(stage0, allow(unused_unsafe))] unsafe { NonNull { pointer: reference as *mut T } } } } @@ -3072,8 +3058,6 @@ impl<'a, T: ?Sized> From<&'a mut T> for NonNull<T> { impl<'a, T: ?Sized> From<&'a T> for NonNull<T> { #[inline] fn from(reference: &'a T) -> Self { - // FIXME: this unsafe block is actually needed - #[cfg_attr(stage0, allow(unused_unsafe))] unsafe { NonNull { pointer: reference as *const T } } } } |
