diff options
| author | bors <bors@rust-lang.org> | 2017-09-01 16:39:31 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-09-01 16:39:31 +0000 |
| commit | f861b6ee46465097eec266c160ac53e230df7cf0 (patch) | |
| tree | 405f0e674dbf26844264142051397b7fcee53d5f /src/libcore | |
| parent | ed532c0d933aaae45e6804efc5936bea078bbaad (diff) | |
| parent | 271c63c18925725a9451c3e769e327f5c5a1167c (diff) | |
Auto merge of #44154 - alexcrichton:bump-bootstrap, r=Mark-Simulacrum
Bump to 1.22.0 and update boostrap compiler Time to get a new nightly!
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/array.rs | 8 | ||||
| -rw-r--r-- | src/libcore/clone.rs | 44 | ||||
| -rw-r--r-- | src/libcore/macros.rs | 10 | ||||
| -rw-r--r-- | src/libcore/mem.rs | 43 | ||||
| -rw-r--r-- | src/libcore/num/f32.rs | 2 | ||||
| -rw-r--r-- | src/libcore/ptr.rs | 27 | ||||
| -rw-r--r-- | src/libcore/tuple.rs | 8 |
7 files changed, 1 insertions, 141 deletions
diff --git a/src/libcore/array.rs b/src/libcore/array.rs index 4b7706bac30..6a7926fecde 100644 --- a/src/libcore/array.rs +++ b/src/libcore/array.rs @@ -124,14 +124,6 @@ macro_rules! array_impls { } #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(stage0)] - impl<T:Copy> Clone for [T; $N] { - fn clone(&self) -> [T; $N] { - *self - } - } - - #[stable(feature = "rust1", since = "1.0.0")] impl<T: Hash> Hash for [T; $N] { fn hash<H: hash::Hasher>(&self, state: &mut H) { Hash::hash(&self[..], state) diff --git a/src/libcore/clone.rs b/src/libcore/clone.rs index 2dc51718b97..826420a0c00 100644 --- a/src/libcore/clone.rs +++ b/src/libcore/clone.rs @@ -88,7 +88,7 @@ /// } /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[cfg_attr(not(stage0), lang = "clone")] +#[lang = "clone"] pub trait Clone : Sized { /// Returns a copy of the value. /// @@ -130,45 +130,3 @@ pub struct AssertParamIsClone<T: Clone + ?Sized> { _field: ::marker::PhantomData reason = "deriving hack, should not be public", issue = "0")] pub struct AssertParamIsCopy<T: Copy + ?Sized> { _field: ::marker::PhantomData<T> } - -#[stable(feature = "rust1", since = "1.0.0")] -#[cfg(stage0)] -impl<'a, T: ?Sized> Clone for &'a T { - /// Returns a shallow copy of the reference. - #[inline] - fn clone(&self) -> &'a T { *self } -} - -macro_rules! clone_impl { - ($t:ty) => { - #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(stage0)] - impl Clone for $t { - /// Returns a deep copy of the value. - #[inline] - fn clone(&self) -> $t { *self } - } - } -} - -clone_impl! { isize } -clone_impl! { i8 } -clone_impl! { i16 } -clone_impl! { i32 } -clone_impl! { i64 } -clone_impl! { i128 } - -clone_impl! { usize } -clone_impl! { u8 } -clone_impl! { u16 } -clone_impl! { u32 } -clone_impl! { u64 } -clone_impl! { u128 } - -clone_impl! { f32 } -clone_impl! { f64 } - -clone_impl! { ! } -clone_impl! { () } -clone_impl! { bool } -clone_impl! { char } diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs index 6e652c8b898..ce183389a80 100644 --- a/src/libcore/macros.rs +++ b/src/libcore/macros.rs @@ -8,16 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[macro_export] -// This stability attribute is totally useless. -#[stable(feature = "rust1", since = "1.0.0")] -#[cfg(stage0)] -macro_rules! __rust_unstable_column { - () => { - column!() - } -} - /// Entry point of thread panic, for details, see std::macros #[macro_export] #[allow_internal_unstable] diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs index 4b866cab1ea..272d75da289 100644 --- a/src/libcore/mem.rs +++ b/src/libcore/mem.rs @@ -188,26 +188,6 @@ pub fn forget<T>(t: T) { /// ``` #[inline] #[stable(feature = "rust1", since = "1.0.0")] -#[cfg(stage0)] -pub fn size_of<T>() -> usize { - unsafe { intrinsics::size_of::<T>() } -} - -/// Returns the size of a type in bytes. -/// -/// More specifically, this is the offset in bytes between successive -/// items of the same type, including alignment padding. -/// -/// # Examples -/// -/// ``` -/// use std::mem; -/// -/// assert_eq!(4, mem::size_of::<i32>()); -/// ``` -#[inline] -#[stable(feature = "rust1", since = "1.0.0")] -#[cfg(not(stage0))] pub const fn size_of<T>() -> usize { unsafe { intrinsics::size_of::<T>() } } @@ -299,29 +279,6 @@ pub fn min_align_of_val<T: ?Sized>(val: &T) -> usize { /// ``` #[inline] #[stable(feature = "rust1", since = "1.0.0")] -#[cfg(stage0)] -pub fn align_of<T>() -> usize { - unsafe { intrinsics::min_align_of::<T>() } -} - -/// Returns the [ABI]-required minimum alignment of a type. -/// -/// Every reference to a value of the type `T` must be a multiple of this number. -/// -/// This is the alignment used for struct fields. It may be smaller than the preferred alignment. -/// -/// [ABI]: https://en.wikipedia.org/wiki/Application_binary_interface -/// -/// # Examples -/// -/// ``` -/// use std::mem; -/// -/// assert_eq!(4, mem::align_of::<i32>()); -/// ``` -#[inline] -#[stable(feature = "rust1", since = "1.0.0")] -#[cfg(not(stage0))] pub const fn align_of<T>() -> usize { unsafe { intrinsics::min_align_of::<T>() } } diff --git a/src/libcore/num/f32.rs b/src/libcore/num/f32.rs index 50683753684..43d38926c97 100644 --- a/src/libcore/num/f32.rs +++ b/src/libcore/num/f32.rs @@ -10,8 +10,6 @@ //! Operations and constants for 32-bits floats (`f32` type) -#![cfg_attr(stage0, allow(overflowing_literals))] - #![stable(feature = "rust1", since = "1.0.0")] use intrinsics; diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index 63e9373e936..2e42e0dfd55 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -875,36 +875,9 @@ pub fn eq<T: ?Sized>(a: *const T, b: *const T) -> bool { a == b } -#[stable(feature = "rust1", since = "1.0.0")] -#[cfg(stage0)] -impl<T: ?Sized> Clone for *const T { - #[inline] - fn clone(&self) -> *const T { - *self - } -} - -#[stable(feature = "rust1", since = "1.0.0")] -#[cfg(stage0)] -impl<T: ?Sized> Clone for *mut T { - #[inline] - fn clone(&self) -> *mut T { - *self - } -} - // Impls for function pointers macro_rules! fnptr_impls_safety_abi { ($FnTy: ty, $($Arg: ident),*) => { - #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(stage0)] - impl<Ret, $($Arg),*> Clone for $FnTy { - #[inline] - fn clone(&self) -> Self { - *self - } - } - #[stable(feature = "fnptr_impls", since = "1.4.0")] impl<Ret, $($Arg),*> PartialEq for $FnTy { #[inline] diff --git a/src/libcore/tuple.rs b/src/libcore/tuple.rs index 555843dba41..4c5370194fe 100644 --- a/src/libcore/tuple.rs +++ b/src/libcore/tuple.rs @@ -22,14 +22,6 @@ macro_rules! tuple_impls { )+) => { $( #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(stage0)] - impl<$($T:Clone),+> Clone for ($($T,)+) { - fn clone(&self) -> ($($T,)+) { - ($(self.$idx.clone(),)+) - } - } - - #[stable(feature = "rust1", since = "1.0.0")] impl<$($T:PartialEq),+> PartialEq for ($($T,)+) where last_type!($($T,)+): ?Sized { #[inline] fn eq(&self, other: &($($T,)+)) -> bool { |
