about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-11-06 13:32:58 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-11-06 13:53:26 -0800
commit953302f85f93306bd156dffaedf2642694eb65ba (patch)
tree3de6998f7e4ed2852af55566ddee81f9c1b031b4 /src/liballoc
parent2a3f0bb657843fad1c65295f5178561692cc7ed6 (diff)
parent5272e6c4c6ed57cd0faafea2925995d9b3023105 (diff)
downloadrust-953302f85f93306bd156dffaedf2642694eb65ba.tar.gz
rust-953302f85f93306bd156dffaedf2642694eb65ba.zip
rollup merge of #18707 : japaric/moar-dst
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/boxed.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs
index d1fc921ffda..0a06f7c0005 100644
--- a/src/liballoc/boxed.rs
+++ b/src/liballoc/boxed.rs
@@ -48,6 +48,10 @@ impl<T: Default> Default for Box<T> {
     fn default() -> Box<T> { box Default::default() }
 }
 
+impl<T> Default for Box<[T]> {
+    fn default() -> Box<[T]> { box [] }
+}
+
 #[unstable]
 impl<T: Clone> Clone for Box<T> {
     /// Returns a copy of the owned box.