about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-04-29 02:16:01 +0000
committerbors <bors@rust-lang.org>2015-04-29 02:16:01 +0000
commitc48b499ea31592fe332e8927ecf64a44ebcb0889 (patch)
tree9d0f557bd32aced1f01622dee07ac1530afe810c /src/libcore
parentc4b23aec4c5ddf32df1e0ba3cc23212327cd8b1f (diff)
parent69abc12b0044d641e714bdd73a299cfa4136b7b8 (diff)
downloadrust-c48b499ea31592fe332e8927ecf64a44ebcb0889.tar.gz
rust-c48b499ea31592fe332e8927ecf64a44ebcb0889.zip
Auto merge of #24888 - tamird:snapshot, r=alexcrichton
r? @alexcrichton cc @brson 
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/cell.rs2
-rw-r--r--src/libcore/fmt/mod.rs18
-rw-r--r--src/libcore/fmt/rt/v1.rs25
-rw-r--r--src/libcore/intrinsics.rs14
-rw-r--r--src/libcore/lib.rs2
-rw-r--r--src/libcore/marker.rs53
-rw-r--r--src/libcore/nonzero.rs6
-rw-r--r--src/libcore/ops.rs3
-rw-r--r--src/libcore/ptr.rs17
9 files changed, 8 insertions, 132 deletions
diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs
index b4b25258bbf..9ff447a87f1 100644
--- a/src/libcore/cell.rs
+++ b/src/libcore/cell.rs
@@ -493,7 +493,6 @@ impl<'b> BorrowRef<'b> {
     }
 }
 
-#[unsafe_destructor]
 impl<'b> Drop for BorrowRef<'b> {
     #[inline]
     fn drop(&mut self) {
@@ -557,7 +556,6 @@ struct BorrowRefMut<'b> {
     _borrow: &'b Cell<BorrowFlag>,
 }
 
-#[unsafe_destructor]
 impl<'b> Drop for BorrowRefMut<'b> {
     #[inline]
     fn drop(&mut self) {
diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs
index 0178b321e88..73778bfd038 100644
--- a/src/libcore/fmt/mod.rs
+++ b/src/libcore/fmt/mod.rs
@@ -34,8 +34,7 @@ mod num;
 mod float;
 mod builders;
 
-#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
-#[cfg_attr(not(stage0), unstable(feature = "core", reason = "internal to format_args!"))]
+#[unstable(feature = "core", reason = "internal to format_args!")]
 #[doc(hidden)]
 pub mod rt {
     pub mod v1;
@@ -148,8 +147,7 @@ enum Void {}
 /// 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.
 #[derive(Copy)]
-#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
-#[cfg_attr(not(stage0), unstable(feature = "core", reason = "internal to format_args!"))]
+#[unstable(feature = "core", reason = "internal to format_args!")]
 #[doc(hidden)]
 pub struct ArgumentV1<'a> {
     value: &'a Void,
@@ -169,8 +167,7 @@ impl<'a> ArgumentV1<'a> {
     }
 
     #[doc(hidden)]
-    #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
-    #[cfg_attr(not(stage0), unstable(feature = "core", reason = "internal to format_args!"))]
+    #[unstable(feature = "core", reason = "internal to format_args!")]
     pub fn new<'b, T>(x: &'b T,
                       f: fn(&T, &mut Formatter) -> Result) -> ArgumentV1<'b> {
         unsafe {
@@ -182,8 +179,7 @@ impl<'a> ArgumentV1<'a> {
     }
 
     #[doc(hidden)]
-    #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
-    #[cfg_attr(not(stage0), unstable(feature = "core", reason = "internal to format_args!"))]
+    #[unstable(feature = "core", reason = "internal to format_args!")]
     pub fn from_usize(x: &usize) -> ArgumentV1 {
         ArgumentV1::new(x, ArgumentV1::show_usize)
     }
@@ -206,8 +202,7 @@ impl<'a> Arguments<'a> {
     /// When using the format_args!() macro, this function is used to generate the
     /// Arguments structure.
     #[doc(hidden)] #[inline]
-    #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
-    #[cfg_attr(not(stage0), unstable(feature = "core", reason = "internal to format_args!"))]
+    #[unstable(feature = "core", reason = "internal to format_args!")]
     pub fn new_v1(pieces: &'a [&'a str],
                   args: &'a [ArgumentV1<'a>]) -> Arguments<'a> {
         Arguments {
@@ -224,8 +219,7 @@ impl<'a> Arguments<'a> {
     /// created with `argumentusize`. However, failing to do so doesn't cause
     /// unsafety, but will ignore invalid .
     #[doc(hidden)] #[inline]
-    #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
-    #[cfg_attr(not(stage0), unstable(feature = "core", reason = "internal to format_args!"))]
+    #[unstable(feature = "core", reason = "internal to format_args!")]
     pub fn new_v1_formatted(pieces: &'a [&'a str],
                             args: &'a [ArgumentV1<'a>],
                             fmt: &'a [rt::v1::Argument]) -> Arguments<'a> {
diff --git a/src/libcore/fmt/rt/v1.rs b/src/libcore/fmt/rt/v1.rs
index 0d851c1e897..2afd8abeb31 100644
--- a/src/libcore/fmt/rt/v1.rs
+++ b/src/libcore/fmt/rt/v1.rs
@@ -14,69 +14,46 @@
 //! These definitions are similar to their `ct` equivalents, but differ in that
 //! these can be statically allocated and are slightly optimized for the runtime
 
-#![cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
-#![cfg_attr(not(stage0), unstable(feature = "core", reason = "internal to format_args!"))]
+#![unstable(feature = "core", reason = "internal to format_args!")]
 
 #[derive(Copy, Clone)]
-#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
 pub struct Argument {
-    #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
     pub position: Position,
-    #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
     pub format: FormatSpec,
 }
 
 #[derive(Copy, Clone)]
-#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
 pub struct FormatSpec {
-    #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
     pub fill: char,
-    #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
     pub align: Alignment,
-    #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
     pub flags: u32,
-    #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
     pub precision: Count,
-    #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
     pub width: Count,
 }
 
 /// Possible alignments that can be requested as part of a formatting directive.
 #[derive(Copy, Clone, PartialEq)]
-#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
 pub enum Alignment {
     /// Indication that contents should be left-aligned.
-    #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
     Left,
     /// Indication that contents should be right-aligned.
-    #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
     Right,
     /// Indication that contents should be center-aligned.
-    #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
     Center,
     /// No alignment was requested.
-    #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
     Unknown,
 }
 
 #[derive(Copy, Clone)]
-#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
 pub enum Count {
-    #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
     Is(usize),
-    #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
     Param(usize),
-    #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
     NextParam,
-    #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
     Implied,
 }
 
 #[derive(Copy, Clone)]
-#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
 pub enum Position {
-    #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
     Next,
-    #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
     At(usize)
 }
diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs
index 8ed89adec5b..9c6a293f421 100644
--- a/src/libcore/intrinsics.rs
+++ b/src/libcore/intrinsics.rs
@@ -303,14 +303,8 @@ extern "rust-intrinsic" {
     /// }
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
-    #[cfg(not(stage0))]
     pub fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize);
 
-    /// dox
-    #[stable(feature = "rust1", since = "1.0.0")]
-    #[cfg(stage0)]
-    pub fn copy_nonoverlapping<T>(dst: *mut T, src: *const T, count: usize);
-
     /// Copies `count * size_of<T>` bytes from `src` to `dst`. The source
     /// and destination may overlap.
     ///
@@ -340,14 +334,8 @@ extern "rust-intrinsic" {
     /// ```
     ///
     #[stable(feature = "rust1", since = "1.0.0")]
-    #[cfg(not(stage0))]
     pub fn copy<T>(src: *const T, dst: *mut T, count: usize);
 
-    /// dox
-    #[stable(feature = "rust1", since = "1.0.0")]
-    #[cfg(stage0)]
-    pub fn copy<T>(dst: *mut T, src: *const T, count: usize);
-
     /// Invokes memset on the specified pointer, setting `count * size_of::<T>()`
     /// bytes of memory starting at `dst` to `c`.
     #[stable(feature = "rust1", since = "1.0.0")]
@@ -572,7 +560,5 @@ extern "rust-intrinsic" {
 
     /// Returns the value of the discriminant for the variant in 'v',
     /// cast to a `u64`; if `T` has no discriminant, returns 0.
-    // SNAP 5520801
-    #[cfg(not(stage0))]
     pub fn discriminant_value<T>(v: &T) -> u64;
 }
diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs
index 249f0a0c389..dd06c3d0987 100644
--- a/src/libcore/lib.rs
+++ b/src/libcore/lib.rs
@@ -65,7 +65,7 @@
 
 #![feature(intrinsics, lang_items)]
 #![feature(on_unimplemented)]
-#![feature(simd, unsafe_destructor)]
+#![feature(simd)]
 #![feature(staged_api)]
 #![feature(unboxed_closures)]
 #![feature(rustc_attrs)]
diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs
index fdabdbc5ed4..44e5390098b 100644
--- a/src/libcore/marker.rs
+++ b/src/libcore/marker.rs
@@ -35,20 +35,10 @@ use hash::Hasher;
 #[stable(feature = "rust1", since = "1.0.0")]
 #[lang="send"]
 #[rustc_on_unimplemented = "`{Self}` cannot be sent between threads safely"]
-#[cfg(not(stage0))]
 pub unsafe trait Send {
     // empty.
 }
 
-/// Types able to be transferred across thread boundaries.
-#[stable(feature = "rust1", since = "1.0.0")]
-#[lang="send"]
-#[rustc_on_unimplemented = "`{Self}` cannot be sent between threads safely"]
-#[cfg(stage0)]
-pub unsafe trait Send : MarkerTrait {
-    // empty.
-}
-
 unsafe impl Send for .. { }
 
 impl<T> !Send for *const T { }
@@ -60,21 +50,10 @@ impl !Send for Managed { }
 #[lang="sized"]
 #[rustc_on_unimplemented = "`{Self}` does not have a constant size known at compile-time"]
 #[fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable
-#[cfg(not(stage0))]
 pub trait Sized {
     // Empty.
 }
 
-/// Types with a constant size known at compile-time.
-#[stable(feature = "rust1", since = "1.0.0")]
-#[lang="sized"]
-#[rustc_on_unimplemented = "`{Self}` does not have a constant size known at compile-time"]
-#[fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable
-#[cfg(stage0)]
-pub trait Sized : MarkerTrait {
-    // Empty.
-}
-
 /// Types that can be copied by simply copying bits (i.e. `memcpy`).
 ///
 /// By default, variable bindings have 'move semantics.' In other
@@ -222,7 +201,6 @@ pub trait Copy : Clone {
 /// wrapper around the value(s) which can be mutated when behind a `&`
 /// reference; not doing this is undefined behaviour (for example,
 /// `transmute`-ing from `&T` to `&mut T` is illegal).
-#[cfg(not(stage0))]
 #[stable(feature = "rust1", since = "1.0.0")]
 #[lang="sync"]
 #[rustc_on_unimplemented = "`{Self}` cannot be shared between threads safely"]
@@ -230,15 +208,6 @@ pub unsafe trait Sync {
     // Empty
 }
 
-/// dox
-#[cfg(stage0)]
-#[stable(feature = "rust1", since = "1.0.0")]
-#[lang="sync"]
-#[rustc_on_unimplemented = "`{Self}` cannot be shared between threads safely"]
-pub unsafe trait Sync : MarkerTrait {
-    // Empty
-}
-
 unsafe impl Sync for .. { }
 
 impl<T> !Sync for *const T { }
@@ -301,20 +270,6 @@ macro_rules! impls{
         )
 }
 
-/// dox
-#[stable(feature = "rust1", since = "1.0.0")]
-#[cfg(stage0)]
-pub trait MarkerTrait : PhantomFn<Self,Self> { }
-
-#[cfg(stage0)]
-impl<T: ?Sized> MarkerTrait for T {}
-
-/// dox
-#[lang="phantom_fn"]
-#[cfg(stage0)]
-pub trait PhantomFn<A:?Sized,R:?Sized=()> {
-}
-
 /// `PhantomData<T>` allows you to describe that a type acts as if it stores a value of type `T`,
 /// even though it does not. This allows you to inform the compiler about certain safety properties
 /// of your code.
@@ -461,14 +416,6 @@ mod impls {
 #[rustc_reflect_like]
 #[unstable(feature = "core", reason = "requires RFC and more experience")]
 #[allow(deprecated)]
-#[cfg(not(stage0))]
 pub trait Reflect {}
 
-/// dox
-#[rustc_reflect_like]
-#[unstable(feature = "core", reason = "requires RFC and more experience")]
-#[cfg(stage0)]
-pub trait Reflect: MarkerTrait {}
-
 impl Reflect for .. { }
-
diff --git a/src/libcore/nonzero.rs b/src/libcore/nonzero.rs
index 9ea44c39fe9..640703ca2f9 100644
--- a/src/libcore/nonzero.rs
+++ b/src/libcore/nonzero.rs
@@ -12,16 +12,10 @@
 
 use marker::Sized;
 use ops::Deref;
-#[cfg(stage0)] use marker::MarkerTrait;
 
 /// Unsafe trait to indicate what types are usable with the NonZero struct
-#[cfg(not(stage0))]
 pub unsafe trait Zeroable {}
 
-/// Unsafe trait to indicate what types are usable with the NonZero struct
-#[cfg(stage0)]
-pub unsafe trait Zeroable: MarkerTrait {}
-
 unsafe impl<T:?Sized> Zeroable for *const T {}
 unsafe impl<T:?Sized> Zeroable for *mut T {}
 unsafe impl Zeroable for isize {}
diff --git a/src/libcore/ops.rs b/src/libcore/ops.rs
index adfbd14121f..8a4f603ec47 100644
--- a/src/libcore/ops.rs
+++ b/src/libcore/ops.rs
@@ -508,8 +508,6 @@ macro_rules! neg_impl_numeric {
 macro_rules! neg_impl_unsigned {
     ($($t:ty)*) => {
         neg_impl_core!{ x => {
-            #[cfg(stage0)]
-            use ::num::wrapping::WrappingOps;
             !x.wrapping_add(1)
         }, $($t)*} }
 }
@@ -1162,7 +1160,6 @@ pub trait FnOnce<Args> {
     extern "rust-call" fn call_once(self, args: Args) -> Self::Output;
 }
 
-#[cfg(not(stage0))]
 mod impls {
     use marker::Sized;
     use super::{Fn, FnMut, FnOnce};
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs
index 0e9570df09d..00326ecd3e7 100644
--- a/src/libcore/ptr.rs
+++ b/src/libcore/ptr.rs
@@ -106,28 +106,11 @@ use cmp::Ordering::{self, Less, Equal, Greater};
 // FIXME #19649: intrinsic docs don't render, so these have no docs :(
 
 #[stable(feature = "rust1", since = "1.0.0")]
-#[cfg(not(stage0))]
 pub use intrinsics::copy_nonoverlapping;
 
-/// dox
-#[cfg(stage0)]
 #[stable(feature = "rust1", since = "1.0.0")]
-pub unsafe fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize) {
-    intrinsics::copy_nonoverlapping(dst, src, count)
-}
-
-#[stable(feature = "rust1", since = "1.0.0")]
-#[cfg(not(stage0))]
 pub use intrinsics::copy;
 
-/// dox
-#[cfg(stage0)]
-#[stable(feature = "rust1", since = "1.0.0")]
-pub unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize) {
-    intrinsics::copy(dst, src, count)
-}
-
-
 #[stable(feature = "rust1", since = "1.0.0")]
 pub use intrinsics::write_bytes;