@@ -136,6 +136,9 @@ pub struct IntermediateBox<T: ?Sized> {
136136 marker : marker:: PhantomData < * mut T > ,
137137}
138138
139+ #[ unstable( feature = "placement_in" ,
140+ reason = "placement box design is still being worked out." ,
141+ issue = "27779" ) ]
139142impl < T > Place < T > for IntermediateBox < T > {
140143 fn pointer ( & mut self ) -> * mut T {
141144 self . ptr as * mut T
@@ -170,19 +173,26 @@ fn make_place<T>() -> IntermediateBox<T> {
170173 }
171174}
172175
176+ #[ unstable( feature = "placement_in" ,
177+ reason = "placement box design is still being worked out." ,
178+ issue = "27779" ) ]
173179impl < T > BoxPlace < T > for IntermediateBox < T > {
174180 fn make_place ( ) -> IntermediateBox < T > {
175181 make_place ( )
176182 }
177183}
178184
185+ #[ unstable( feature = "placement_in" ,
186+ reason = "placement box design is still being worked out." ,
187+ issue = "27779" ) ]
179188impl < T > InPlace < T > for IntermediateBox < T > {
180189 type Owner = Box < T > ;
181190 unsafe fn finalize ( self ) -> Box < T > {
182191 finalize ( self )
183192 }
184193}
185194
195+ #[ unstable( feature = "placement_new_protocol" , issue = "27779" ) ]
186196impl < T > Boxed for Box < T > {
187197 type Data = T ;
188198 type Place = IntermediateBox < T > ;
@@ -191,6 +201,9 @@ impl<T> Boxed for Box<T> {
191201 }
192202}
193203
204+ #[ unstable( feature = "placement_in" ,
205+ reason = "placement box design is still being worked out." ,
206+ issue = "27779" ) ]
194207impl < T > Placer < T > for ExchangeHeapSingleton {
195208 type Place = IntermediateBox < T > ;
196209
@@ -199,6 +212,9 @@ impl<T> Placer<T> for ExchangeHeapSingleton {
199212 }
200213}
201214
215+ #[ unstable( feature = "placement_in" ,
216+ reason = "placement box design is still being worked out." ,
217+ issue = "27779" ) ]
202218impl < T : ?Sized > Drop for IntermediateBox < T > {
203219 fn drop ( & mut self ) {
204220 if self . size > 0 {
@@ -518,6 +534,7 @@ pub trait FnBox<A> {
518534 fn call_box ( self : Box < Self > , args : A ) -> Self :: Output ;
519535}
520536
537+ #[ unstable( feature = "fnbox" , reason = "Newly introduced" , issue = "0" ) ]
521538impl < A , F > FnBox < A > for F
522539 where F : FnOnce < A >
523540{
@@ -528,6 +545,7 @@ impl<A,F> FnBox<A> for F
528545 }
529546}
530547
548+ #[ unstable( feature = "fnbox" , reason = "Newly introduced" , issue = "0" ) ]
531549impl < ' a , A , R > FnOnce < A > for Box < FnBox < A , Output =R > +' a > {
532550 type Output = R ;
533551
@@ -536,6 +554,7 @@ impl<'a,A,R> FnOnce<A> for Box<FnBox<A,Output=R>+'a> {
536554 }
537555}
538556
557+ #[ unstable( feature = "fnbox" , reason = "Newly introduced" , issue = "0" ) ]
539558impl < ' a , A , R > FnOnce < A > for Box < FnBox < A , Output =R > +Send +' a > {
540559 type Output = R ;
541560
@@ -544,6 +563,7 @@ impl<'a,A,R> FnOnce<A> for Box<FnBox<A,Output=R>+Send+'a> {
544563 }
545564}
546565
566+ #[ unstable( feature = "coerce_unsized" , issue = "27732" ) ]
547567impl < T : ?Sized +Unsize < U > , U : ?Sized > CoerceUnsized < Box < U > > for Box < T > { }
548568
549569#[ stable( feature = "box_slice_clone" , since = "1.3.0" ) ]
@@ -597,12 +617,14 @@ impl<T: Clone> Clone for Box<[T]> {
597617 }
598618}
599619
620+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
600621impl < T : ?Sized > borrow:: Borrow < T > for Box < T > {
601622 fn borrow ( & self ) -> & T {
602623 & * * self
603624 }
604625}
605626
627+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
606628impl < T : ?Sized > borrow:: BorrowMut < T > for Box < T > {
607629 fn borrow_mut ( & mut self ) -> & mut T {
608630 & mut * * self
0 commit comments