diff options
| author | bors <bors@rust-lang.org> | 2015-05-13 06:43:05 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-05-13 06:43:05 +0000 |
| commit | fa433875274ff4a7c4cab7d87c1284ba782ef643 (patch) | |
| tree | d8e0dada660d0606983ad1f3efc4761f4b515489 /src/liballoc/boxed.rs | |
| parent | 30a42faa1c42ce5988241d3af993921246954b1a (diff) | |
| parent | b799cd83cc797b580be2d1492e6ae014848636ee (diff) | |
| download | rust-fa433875274ff4a7c4cab7d87c1284ba782ef643.tar.gz rust-fa433875274ff4a7c4cab7d87c1284ba782ef643.zip | |
Auto merge of #24619 - nrc:rc-coerce, r=nikomatsakis
r? @nikomatsakis (note a few TODOs left in the code where I wasn't sure about stuff).
Diffstat (limited to 'src/liballoc/boxed.rs')
| -rw-r--r-- | src/liballoc/boxed.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index a0d60be3000..35732dacd44 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -62,6 +62,11 @@ use core::ops::{Deref, DerefMut}; use core::ptr::{Unique}; use core::raw::{TraitObject}; +#[cfg(not(stage0))] +use core::marker::Unsize; +#[cfg(not(stage0))] +use core::ops::CoerceUnsized; + /// A value that represents the heap. This is the default place that the `box` /// keyword allocates into when no place is supplied. /// @@ -390,3 +395,6 @@ impl<'a,A,R> FnOnce<A> for Box<FnBox<A,Output=R>+Send+'a> { self.call_box(args) } } + +#[cfg(not(stage0))] +impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<Box<U>> for Box<T> {} |
