about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-01-31 00:02:15 +0000
committerbors <bors@rust-lang.org>2017-01-31 00:02:15 +0000
commit8e9e0552767113ec24f6f8f207ade36a7bc5a091 (patch)
treee07fc1c387b815b0ae802e679e9a7fb7eb81ebd6 /src/liballoc
parent892170765387ca7bd332900efecf6ec7dc5df700 (diff)
parent93e3f634b096129227c3863b76a1f303716122f4 (diff)
downloadrust-8e9e0552767113ec24f6f8f207ade36a7bc5a091.tar.gz
rust-8e9e0552767113ec24f6f8f207ade36a7bc5a091.zip
Auto merge of #39230 - petrochenkov:nobox, r=eddyb
Refactoring TyBox -> TyAdt

r? @eddyb
cc @Manishearth
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/boxed.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs
index 5409ade2923..b6f490e09cd 100644
--- a/src/liballoc/boxed.rs
+++ b/src/liballoc/boxed.rs
@@ -103,6 +103,7 @@ pub struct ExchangeHeapSingleton {
 ///
 /// See the [module-level documentation](../../std/boxed/index.html) for more.
 #[lang = "owned_box"]
+#[fundamental]
 #[stable(feature = "rust1", since = "1.0.0")]
 pub struct Box<T: ?Sized>(Unique<T>);
 
@@ -292,6 +293,14 @@ impl<T: ?Sized> Box<T> {
     }
 }
 
+#[cfg(not(stage0))]
+#[stable(feature = "rust1", since = "1.0.0")]
+unsafe impl<#[may_dangle] T: ?Sized> Drop for Box<T> {
+    fn drop(&mut self) {
+        // FIXME: Do nothing, drop is currently performed by compiler.
+    }
+}
+
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T: Default> Default for Box<T> {
     /// Creates a `Box<T>`, with the `Default` value for T.