Skip to content

Commit fa43387

Browse files
committed
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).
2 parents 30a42fa + b799cd8 commit fa43387

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1669
-609
lines changed

src/liballoc/boxed.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ use core::ops::{Deref, DerefMut};
6262
use core::ptr::{Unique};
6363
use core::raw::{TraitObject};
6464

65+
#[cfg(not(stage0))]
66+
use core::marker::Unsize;
67+
#[cfg(not(stage0))]
68+
use core::ops::CoerceUnsized;
69+
6570
/// A value that represents the heap. This is the default place that the `box`
6671
/// keyword allocates into when no place is supplied.
6772
///
@@ -390,3 +395,6 @@ impl<'a,A,R> FnOnce<A> for Box<FnBox<A,Output=R>+Send+'a> {
390395
self.call_box(args)
391396
}
392397
}
398+
399+
#[cfg(not(stage0))]
400+
impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<Box<U>> for Box<T> {}

0 commit comments

Comments
 (0)