From d4825b92bc6405b83e989522ee420f7c0110be81 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 18 Dec 2013 09:29:50 -0800 Subject: [PATCH] Register new snapshots Time for a visit from the snapshot fairy! --- src/libstd/cell.rs | 35 ----------------------------------- src/libstd/kinds.rs | 1 - src/libstd/prelude.rs | 6 +----- src/snapshots.txt | 8 ++++++++ 4 files changed, 9 insertions(+), 41 deletions(-) diff --git a/src/libstd/cell.rs b/src/libstd/cell.rs index b33106a7f66ad..62fc08fd9d394 100644 --- a/src/libstd/cell.rs +++ b/src/libstd/cell.rs @@ -14,9 +14,6 @@ use prelude::*; use cast; use util::NonCopyable; -#[cfg(stage0)] -use unstable::intrinsics; - /// A mutable memory location that admits only `Pod` data. #[no_freeze] #[deriving(Clone)] @@ -24,38 +21,6 @@ pub struct Cell { priv value: T, } -// NB: For `stage0`, we omit the `Pod` bound. This is unsound but will help -// us get started on removing `@mut` from `rustc`. - -#[cfg(stage0)] -impl Cell { - /// Creates a new `Cell` containing the given value. - pub fn new(value: T) -> Cell { - Cell { - value: value, - } - } - - /// Returns a copy of the contained value. - #[inline] - pub fn get(&self) -> T { - unsafe { - let mut result = intrinsics::uninit(); - intrinsics::copy_nonoverlapping_memory(&mut result, &self.value, 1); - result - } - } - - /// Sets the contained value. - #[inline] - pub fn set(&self, value: T) { - unsafe { - intrinsics::copy_nonoverlapping_memory(cast::transmute_mut(&self.value), &value, 1) - } - } -} - -#[cfg(not(stage0))] impl Cell { /// Creates a new `Cell` containing the given value. pub fn new(value: T) -> Cell { diff --git a/src/libstd/kinds.rs b/src/libstd/kinds.rs index 8d9fec1a4b744..b116f92f3d0c9 100644 --- a/src/libstd/kinds.rs +++ b/src/libstd/kinds.rs @@ -41,7 +41,6 @@ pub trait Sized { /// Types that can be copied by simply copying bits (i.e. `memcpy`). /// /// The name "POD" stands for "Plain Old Data" and is borrowed from C++. -#[cfg(not(stage0))] #[lang="pod"] pub trait Pod { // Empty. diff --git a/src/libstd/prelude.rs b/src/libstd/prelude.rs index f0e80eef467cf..47004ea173f32 100644 --- a/src/libstd/prelude.rs +++ b/src/libstd/prelude.rs @@ -28,8 +28,7 @@ Rust's prelude has three main parts: // Reexported core operators pub use either::{Either, Left, Right}; -pub use kinds::Sized; -pub use kinds::{Freeze, Send}; +pub use kinds::{Freeze, Pod, Send, Sized}; pub use ops::{Add, Sub, Mul, Div, Rem, Neg, Not}; pub use ops::{BitAnd, BitOr, BitXor}; pub use ops::{Drop}; @@ -37,9 +36,6 @@ pub use ops::{Shl, Shr, Index}; pub use option::{Option, Some, None}; pub use result::{Result, Ok, Err}; -#[cfg(not(stage0))] -pub use kinds::Pod; - // Reexported functions pub use from_str::from_str; pub use iter::range; diff --git a/src/snapshots.txt b/src/snapshots.txt index c2c5512eaef31..8b9713fc3a4b1 100644 --- a/src/snapshots.txt +++ b/src/snapshots.txt @@ -1,3 +1,11 @@ +S 2013-12-17 d5798b3 + freebsd-x86_64 8f71dbd1aef6c59867ce6287cc82c6033e1ee5e5 + linux-i386 3a6e8950ef704ec57ab690b30beda19d7a63a537 + linux-x86_64 dc6cab75e98b6ca77ba7792aa39eda5875741d93 + macos-i386 ec9f8fd4b2f47f4160ed674350c70560a0cf5bb8 + macos-x86_64 ebae3ac1c05b42031e5f2859cd9c499dc644f8b1 + winnt-i386 4419876bcd00c1b75df7d86381aff4c0617030f7 + S 2013-12-10 b8b16ae freebsd-x86_64 08d28a3a47f4263dc0a005374e59d30b1b942ab2 linux-i386 4cd5d8b80014a69dea9744fd12c8cdab6269d263