about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-12-18 22:41:36 -0800
committerbors <bors@rust-lang.org>2013-12-18 22:41:36 -0800
commit52769b61803adc99767b5e7e2aa2bbd51b2ea46a (patch)
treed7c0728a603c8c7e2f4c602025c2686785f6a32a /src/libstd
parentb760ed6573aae61922ecdeeae75cc0a175c58e00 (diff)
parentd4825b92bc6405b83e989522ee420f7c0110be81 (diff)
downloadrust-52769b61803adc99767b5e7e2aa2bbd51b2ea46a.tar.gz
rust-52769b61803adc99767b5e7e2aa2bbd51b2ea46a.zip
auto merge of #11050 : alexcrichton/rust/snapshots, r=brson
Time for a visit from the snapshot fairy!
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/cell.rs35
-rw-r--r--src/libstd/kinds.rs1
-rw-r--r--src/libstd/prelude.rs6
3 files changed, 1 insertions, 41 deletions
diff --git a/src/libstd/cell.rs b/src/libstd/cell.rs
index b33106a7f66..62fc08fd9d3 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<T> {
     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<T> Cell<T> {
-    /// Creates a new `Cell` containing the given value.
-    pub fn new(value: T) -> Cell<T> {
-        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<T: ::kinds::Pod> Cell<T> {
     /// Creates a new `Cell` containing the given value.
     pub fn new(value: T) -> Cell<T> {
diff --git a/src/libstd/kinds.rs b/src/libstd/kinds.rs
index 8d9fec1a4b7..b116f92f3d0 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 f0e80eef467..47004ea173f 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;