about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-05-03 09:31:49 -0700
committerbors <bors@rust-lang.org>2014-05-03 09:31:49 -0700
commitbca9647cd34c78a1c7c2409fbb2c31cb2c8194d7 (patch)
tree005a81de24ffe6144a32a02ca47314d676fd3f14 /src/libstd
parent757f106bcc771e10073bfcfa5331ad2bd5f1fe21 (diff)
parent7c64f0360774c05dfc819270f8f53266b23b1ced (diff)
downloadrust-bca9647cd34c78a1c7c2409fbb2c31cb2c8194d7.tar.gz
rust-bca9647cd34c78a1c7c2409fbb2c31cb2c8194d7.zip
auto merge of #13904 : pcwalton/rust/box, r=alexcrichton
r? @alexcrichton

RFC#14 

Issue #13885.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/owned.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libstd/owned.rs b/src/libstd/owned.rs
index 1fa86c53117..826ada8f252 100644
--- a/src/libstd/owned.rs
+++ b/src/libstd/owned.rs
@@ -26,6 +26,14 @@ pub static HEAP: () = ();
 #[cfg(test)]
 pub static HEAP: () = ();
 
+/// A type that represents a uniquely-owned value.
+#[lang="owned_box"]
+#[cfg(not(test))]
+pub struct Box<T>(*T);
+
+#[cfg(test)]
+pub struct Box<T>(*T);
+
 #[cfg(not(test))]
 impl<T:Eq> Eq for ~T {
     #[inline]