about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-02-24 04:42:09 +0000
committerbors <bors@rust-lang.org>2016-02-24 04:42:09 +0000
commit304c790fc28182d266ad7532b637975b3fb1d67f (patch)
treef7bbbc9bc37618bf6569f4e8ff4e805aa90a2883 /src/libstd
parenta4574bd4a5e92400ef700cf69cab420b490b377a (diff)
parenta92ee0f664c84545c3cba70644472ec3df23c1ee (diff)
downloadrust-304c790fc28182d266ad7532b637975b3fb1d67f.tar.gz
rust-304c790fc28182d266ad7532b637975b3fb1d67f.zip
Auto merge of #31778 - aturon:snapshot, r=alexcrichton
r? @alexcrichton
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/collections/hash/map.rs4
-rw-r--r--src/libstd/env.rs2
-rw-r--r--src/libstd/io/mod.rs6
-rw-r--r--src/libstd/net/addr.rs4
-rw-r--r--src/libstd/net/ip.rs4
-rw-r--r--src/libstd/path.rs20
-rw-r--r--src/libstd/sync/mpsc/mod.rs4
-rw-r--r--src/libstd/sys/common/poison.rs2
-rw-r--r--src/libstd/sys/common/unwind/gcc.rs1
-rw-r--r--src/libstd/sys/common/unwind/mod.rs17
-rw-r--r--src/libstd/sys/common/unwind/seh.rs29
-rw-r--r--src/libstd/sys/common/unwind/seh64_gnu.rs1
12 files changed, 23 insertions, 71 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs
index 7220690469c..051829fbafb 100644
--- a/src/libstd/collections/hash/map.rs
+++ b/src/libstd/collections/hash/map.rs
@@ -1402,13 +1402,13 @@ pub enum Entry<'a, K: 'a, V: 'a> {
     /// An occupied Entry.
     #[stable(feature = "rust1", since = "1.0.0")]
     Occupied(
-        #[cfg_attr(not(stage0), stable(feature = "rust1", since = "1.0.0"))] OccupiedEntry<'a, K, V>
+        #[stable(feature = "rust1", since = "1.0.0")] OccupiedEntry<'a, K, V>
     ),
 
     /// A vacant Entry.
     #[stable(feature = "rust1", since = "1.0.0")]
     Vacant(
-        #[cfg_attr(not(stage0), stable(feature = "rust1", since = "1.0.0"))] VacantEntry<'a, K, V>
+        #[stable(feature = "rust1", since = "1.0.0")] VacantEntry<'a, K, V>
     ),
 }
 
diff --git a/src/libstd/env.rs b/src/libstd/env.rs
index f7e13a35e9e..aa6a6d548b3 100644
--- a/src/libstd/env.rs
+++ b/src/libstd/env.rs
@@ -218,7 +218,7 @@ pub enum VarError {
     /// valid unicode data. The found data is returned as a payload of this
     /// variant.
     #[stable(feature = "env", since = "1.0.0")]
-    NotUnicode(#[cfg_attr(not(stage0), stable(feature = "env", since = "1.0.0"))] OsString),
+    NotUnicode(#[stable(feature = "env", since = "1.0.0")] OsString),
 }
 
 #[stable(feature = "env", since = "1.0.0")]
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs
index abb47b69418..6bdfdcd364a 100644
--- a/src/libstd/io/mod.rs
+++ b/src/libstd/io/mod.rs
@@ -1175,7 +1175,7 @@ pub trait Seek {
 pub enum SeekFrom {
     /// Set the offset to the provided number of bytes.
     #[stable(feature = "rust1", since = "1.0.0")]
-    Start(#[cfg_attr(not(stage0), stable(feature = "rust1", since = "1.0.0"))] u64),
+    Start(#[stable(feature = "rust1", since = "1.0.0")] u64),
 
     /// Set the offset to the size of this object plus the specified number of
     /// bytes.
@@ -1183,7 +1183,7 @@ pub enum SeekFrom {
     /// It is possible to seek beyond the end of an object, but it's an error to
     /// seek before byte 0.
     #[stable(feature = "rust1", since = "1.0.0")]
-    End(#[cfg_attr(not(stage0), stable(feature = "rust1", since = "1.0.0"))] i64),
+    End(#[stable(feature = "rust1", since = "1.0.0")] i64),
 
     /// Set the offset to the current position plus the specified number of
     /// bytes.
@@ -1191,7 +1191,7 @@ pub enum SeekFrom {
     /// It is possible to seek beyond the end of an object, but it's an error to
     /// seek before byte 0.
     #[stable(feature = "rust1", since = "1.0.0")]
-    Current(#[cfg_attr(not(stage0), stable(feature = "rust1", since = "1.0.0"))] i64),
+    Current(#[stable(feature = "rust1", since = "1.0.0")] i64),
 }
 
 fn read_until<R: BufRead + ?Sized>(r: &mut R, delim: u8, buf: &mut Vec<u8>)
diff --git a/src/libstd/net/addr.rs b/src/libstd/net/addr.rs
index 89c51c70843..6ce6777d11e 100644
--- a/src/libstd/net/addr.rs
+++ b/src/libstd/net/addr.rs
@@ -32,10 +32,10 @@ use slice;
 pub enum SocketAddr {
     /// An IPv4 socket address which is a (ip, port) combination.
     #[stable(feature = "rust1", since = "1.0.0")]
-    V4(#[cfg_attr(not(stage0), stable(feature = "rust1", since = "1.0.0"))] SocketAddrV4),
+    V4(#[stable(feature = "rust1", since = "1.0.0")] SocketAddrV4),
     /// An IPv6 socket address
     #[stable(feature = "rust1", since = "1.0.0")]
-    V6(#[cfg_attr(not(stage0), stable(feature = "rust1", since = "1.0.0"))] SocketAddrV6),
+    V6(#[stable(feature = "rust1", since = "1.0.0")] SocketAddrV6),
 }
 
 /// An IPv4 socket address which is a (ip, port) combination.
diff --git a/src/libstd/net/ip.rs b/src/libstd/net/ip.rs
index 8a4d7e3e2c2..68075af61cf 100644
--- a/src/libstd/net/ip.rs
+++ b/src/libstd/net/ip.rs
@@ -27,10 +27,10 @@ use sys_common::{AsInner, FromInner};
 pub enum IpAddr {
     /// Representation of an IPv4 address.
     #[stable(feature = "ip_addr", since = "1.7.0")]
-    V4(#[cfg_attr(not(stage0), stable(feature = "rust1", since = "1.7.0"))] Ipv4Addr),
+    V4(#[stable(feature = "ip_addr", since = "1.7.0")] Ipv4Addr),
     /// Representation of an IPv6 address.
     #[stable(feature = "ip_addr", since = "1.7.0")]
-    V6(#[cfg_attr(not(stage0), stable(feature = "rust1", since = "1.7.0"))] Ipv6Addr),
+    V6(#[stable(feature = "ip_addr", since = "1.7.0")] Ipv6Addr),
 }
 
 /// Representation of an IPv4 address.
diff --git a/src/libstd/path.rs b/src/libstd/path.rs
index 937a7a8cae9..35118bde96b 100644
--- a/src/libstd/path.rs
+++ b/src/libstd/path.rs
@@ -268,33 +268,33 @@ mod platform {
 pub enum Prefix<'a> {
     /// Prefix `\\?\`, together with the given component immediately following it.
     #[stable(feature = "rust1", since = "1.0.0")]
-    Verbatim(#[cfg_attr(not(stage0), stable(feature = "rust1", since = "1.0.0"))] &'a OsStr),
+    Verbatim(#[stable(feature = "rust1", since = "1.0.0")] &'a OsStr),
 
     /// Prefix `\\?\UNC\`, with the "server" and "share" components following it.
     #[stable(feature = "rust1", since = "1.0.0")]
     VerbatimUNC(
-        #[cfg_attr(not(stage0), stable(feature = "rust1", since = "1.0.0"))] &'a OsStr,
-        #[cfg_attr(not(stage0), stable(feature = "rust1", since = "1.0.0"))] &'a OsStr,
+        #[stable(feature = "rust1", since = "1.0.0")] &'a OsStr,
+        #[stable(feature = "rust1", since = "1.0.0")] &'a OsStr,
     ),
 
     /// Prefix like `\\?\C:\`, for the given drive letter
     #[stable(feature = "rust1", since = "1.0.0")]
-    VerbatimDisk(#[cfg_attr(not(stage0), stable(feature = "rust1", since = "1.0.0"))] u8),
+    VerbatimDisk(#[stable(feature = "rust1", since = "1.0.0")] u8),
 
     /// Prefix `\\.\`, together with the given component immediately following it.
     #[stable(feature = "rust1", since = "1.0.0")]
-    DeviceNS(#[cfg_attr(not(stage0), stable(feature = "rust1", since = "1.0.0"))] &'a OsStr),
+    DeviceNS(#[stable(feature = "rust1", since = "1.0.0")] &'a OsStr),
 
     /// Prefix `\\server\share`, with the given "server" and "share" components.
     #[stable(feature = "rust1", since = "1.0.0")]
     UNC(
-        #[cfg_attr(not(stage0), stable(feature = "rust1", since = "1.0.0"))] &'a OsStr,
-        #[cfg_attr(not(stage0), stable(feature = "rust1", since = "1.0.0"))] &'a OsStr,
+        #[stable(feature = "rust1", since = "1.0.0")] &'a OsStr,
+        #[stable(feature = "rust1", since = "1.0.0")] &'a OsStr,
     ),
 
     /// Prefix `C:` for the given disk drive.
     #[stable(feature = "rust1", since = "1.0.0")]
-    Disk(#[cfg_attr(not(stage0), stable(feature = "rust1", since = "1.0.0"))] u8),
+    Disk(#[stable(feature = "rust1", since = "1.0.0")] u8),
 }
 
 impl<'a> Prefix<'a> {
@@ -537,7 +537,7 @@ pub enum Component<'a> {
     /// Does not occur on Unix.
     #[stable(feature = "rust1", since = "1.0.0")]
     Prefix(
-        #[cfg_attr(not(stage0), stable(feature = "rust1", since = "1.0.0"))] PrefixComponent<'a>
+        #[stable(feature = "rust1", since = "1.0.0")] PrefixComponent<'a>
     ),
 
     /// The root directory component, appears after any prefix and before anything else
@@ -554,7 +554,7 @@ pub enum Component<'a> {
 
     /// A normal component, i.e. `a` and `b` in `a/b`
     #[stable(feature = "rust1", since = "1.0.0")]
-    Normal(#[cfg_attr(not(stage0), stable(feature = "rust1", since = "1.0.0"))] &'a OsStr),
+    Normal(#[stable(feature = "rust1", since = "1.0.0")] &'a OsStr),
 }
 
 impl<'a> Component<'a> {
diff --git a/src/libstd/sync/mpsc/mod.rs b/src/libstd/sync/mpsc/mod.rs
index 9487295fd1a..fadca390986 100644
--- a/src/libstd/sync/mpsc/mod.rs
+++ b/src/libstd/sync/mpsc/mod.rs
@@ -385,12 +385,12 @@ pub enum TrySendError<T> {
     /// this is not a buffered channel, then there is no receiver available to
     /// acquire the data.
     #[stable(feature = "rust1", since = "1.0.0")]
-    Full(#[cfg_attr(not(stage0), stable(feature = "rust1", since = "1.0.0"))] T),
+    Full(#[stable(feature = "rust1", since = "1.0.0")] T),
 
     /// This channel's receiving half has disconnected, so the data could not be
     /// sent. The data is returned back to the callee in this case.
     #[stable(feature = "rust1", since = "1.0.0")]
-    Disconnected(#[cfg_attr(not(stage0), stable(feature = "rust1", since = "1.0.0"))] T),
+    Disconnected(#[stable(feature = "rust1", since = "1.0.0")] T),
 }
 
 enum Flavor<T> {
diff --git a/src/libstd/sys/common/poison.rs b/src/libstd/sys/common/poison.rs
index d858c002755..83780a31cce 100644
--- a/src/libstd/sys/common/poison.rs
+++ b/src/libstd/sys/common/poison.rs
@@ -71,7 +71,7 @@ pub enum TryLockError<T> {
     /// The lock could not be acquired because another thread failed while holding
     /// the lock.
     #[stable(feature = "rust1", since = "1.0.0")]
-    Poisoned(#[cfg_attr(not(stage0), stable(feature = "rust1", since = "1.0.0"))] PoisonError<T>),
+    Poisoned(#[stable(feature = "rust1", since = "1.0.0")] PoisonError<T>),
     /// The lock could not be acquired at this time because the operation would
     /// otherwise block.
     #[stable(feature = "rust1", since = "1.0.0")]
diff --git a/src/libstd/sys/common/unwind/gcc.rs b/src/libstd/sys/common/unwind/gcc.rs
index 7cf9e2a54bd..ff6a11951dc 100644
--- a/src/libstd/sys/common/unwind/gcc.rs
+++ b/src/libstd/sys/common/unwind/gcc.rs
@@ -41,7 +41,6 @@ pub unsafe fn panic(data: Box<Any + Send + 'static>) -> ! {
     }
 }
 
-#[cfg(not(stage0))]
 pub fn payload() -> *mut u8 {
     0 as *mut u8
 }
diff --git a/src/libstd/sys/common/unwind/mod.rs b/src/libstd/sys/common/unwind/mod.rs
index d9641e63760..527c2e63030 100644
--- a/src/libstd/sys/common/unwind/mod.rs
+++ b/src/libstd/sys/common/unwind/mod.rs
@@ -128,7 +128,6 @@ pub unsafe fn try<F: FnOnce()>(f: F) -> Result<(), Box<Any + Send>> {
     }
 }
 
-#[cfg(not(stage0))]
 unsafe fn inner_try(f: fn(*mut u8), data: *mut u8)
                     -> Result<(), Box<Any + Send>> {
     PANIC_COUNT.with(|s| {
@@ -156,22 +155,6 @@ unsafe fn inner_try(f: fn(*mut u8), data: *mut u8)
     })
 }
 
-#[cfg(stage0)]
-unsafe fn inner_try(f: fn(*mut u8), data: *mut u8)
-                    -> Result<(), Box<Any + Send>> {
-    PANIC_COUNT.with(|s| {
-        let prev = s.get();
-        s.set(0);
-        let ep = intrinsics::try(f, data);
-        s.set(prev);
-        if ep.is_null() {
-            Ok(())
-        } else {
-            Err(imp::cleanup(ep))
-        }
-    })
-}
-
 /// Determines whether the current thread is unwinding because of panic.
 pub fn panicking() -> bool {
     PANIC_COUNT.with(|s| s.get() != 0)
diff --git a/src/libstd/sys/common/unwind/seh.rs b/src/libstd/sys/common/unwind/seh.rs
index f8d3a92b3b6..94da42f0092 100644
--- a/src/libstd/sys/common/unwind/seh.rs
+++ b/src/libstd/sys/common/unwind/seh.rs
@@ -65,35 +65,6 @@ const RUST_PANIC: c::DWORD = 0x00525354;
 
 pub use self::imp::*;
 
-#[cfg(stage0)]
-mod imp {
-    use prelude::v1::*;
-    use any::Any;
-
-    pub unsafe fn panic(_data: Box<Any + Send + 'static>) -> ! {
-        rtabort!("cannot unwind SEH in stage0")
-    }
-
-    pub unsafe fn cleanup(_ptr: *mut u8) -> Box<Any + Send + 'static> {
-        rtabort!("can't cleanup SEH in stage0")
-    }
-
-    #[lang = "msvc_try_filter"]
-    #[linkage = "external"]
-    unsafe extern fn __rust_try_filter() -> i32 {
-        0
-    }
-
-    #[lang = "eh_unwind_resume"]
-    #[unwind]
-    unsafe extern fn rust_eh_unwind_resume(_ptr: *mut u8) -> ! {
-        rtabort!("can't resume unwind SEH in stage0")
-    }
-    #[lang = "eh_personality_catch"]
-    unsafe extern fn rust_eh_personality_catch() {}
-}
-
-#[cfg(not(stage0))]
 mod imp {
     use prelude::v1::*;
 
diff --git a/src/libstd/sys/common/unwind/seh64_gnu.rs b/src/libstd/sys/common/unwind/seh64_gnu.rs
index 8afef081673..57281d67ebb 100644
--- a/src/libstd/sys/common/unwind/seh64_gnu.rs
+++ b/src/libstd/sys/common/unwind/seh64_gnu.rs
@@ -50,7 +50,6 @@ pub unsafe fn panic(data: Box<Any + Send + 'static>) -> ! {
     rtabort!("could not unwind stack");
 }
 
-#[cfg(not(stage0))]
 pub fn payload() -> *mut u8 {
     0 as *mut u8
 }