@@ -136,6 +136,9 @@ pub struct IntermediateBox<T: ?Sized> {
136
136
marker : marker:: PhantomData < * mut T > ,
137
137
}
138
138
139
+ #[ unstable( feature = "placement_in" ,
140
+ reason = "placement box design is still being worked out." ,
141
+ issue = "27779" ) ]
139
142
impl < T > Place < T > for IntermediateBox < T > {
140
143
fn pointer ( & mut self ) -> * mut T {
141
144
self . ptr as * mut T
@@ -170,19 +173,26 @@ fn make_place<T>() -> IntermediateBox<T> {
170
173
}
171
174
}
172
175
176
+ #[ unstable( feature = "placement_in" ,
177
+ reason = "placement box design is still being worked out." ,
178
+ issue = "27779" ) ]
173
179
impl < T > BoxPlace < T > for IntermediateBox < T > {
174
180
fn make_place ( ) -> IntermediateBox < T > {
175
181
make_place ( )
176
182
}
177
183
}
178
184
185
+ #[ unstable( feature = "placement_in" ,
186
+ reason = "placement box design is still being worked out." ,
187
+ issue = "27779" ) ]
179
188
impl < T > InPlace < T > for IntermediateBox < T > {
180
189
type Owner = Box < T > ;
181
190
unsafe fn finalize ( self ) -> Box < T > {
182
191
finalize ( self )
183
192
}
184
193
}
185
194
195
+ #[ unstable( feature = "placement_new_protocol" , issue = "27779" ) ]
186
196
impl < T > Boxed for Box < T > {
187
197
type Data = T ;
188
198
type Place = IntermediateBox < T > ;
@@ -191,6 +201,9 @@ impl<T> Boxed for Box<T> {
191
201
}
192
202
}
193
203
204
+ #[ unstable( feature = "placement_in" ,
205
+ reason = "placement box design is still being worked out." ,
206
+ issue = "27779" ) ]
194
207
impl < T > Placer < T > for ExchangeHeapSingleton {
195
208
type Place = IntermediateBox < T > ;
196
209
@@ -199,6 +212,9 @@ impl<T> Placer<T> for ExchangeHeapSingleton {
199
212
}
200
213
}
201
214
215
+ #[ unstable( feature = "placement_in" ,
216
+ reason = "placement box design is still being worked out." ,
217
+ issue = "27779" ) ]
202
218
impl < T : ?Sized > Drop for IntermediateBox < T > {
203
219
fn drop ( & mut self ) {
204
220
if self . size > 0 {
@@ -518,6 +534,7 @@ pub trait FnBox<A> {
518
534
fn call_box ( self : Box < Self > , args : A ) -> Self :: Output ;
519
535
}
520
536
537
+ #[ unstable( feature = "fnbox" , reason = "Newly introduced" , issue = "0" ) ]
521
538
impl < A , F > FnBox < A > for F
522
539
where F : FnOnce < A >
523
540
{
@@ -528,6 +545,7 @@ impl<A,F> FnBox<A> for F
528
545
}
529
546
}
530
547
548
+ #[ unstable( feature = "fnbox" , reason = "Newly introduced" , issue = "0" ) ]
531
549
impl < ' a , A , R > FnOnce < A > for Box < FnBox < A , Output =R > +' a > {
532
550
type Output = R ;
533
551
@@ -536,6 +554,7 @@ impl<'a,A,R> FnOnce<A> for Box<FnBox<A,Output=R>+'a> {
536
554
}
537
555
}
538
556
557
+ #[ unstable( feature = "fnbox" , reason = "Newly introduced" , issue = "0" ) ]
539
558
impl < ' a , A , R > FnOnce < A > for Box < FnBox < A , Output =R > +Send +' a > {
540
559
type Output = R ;
541
560
@@ -544,6 +563,7 @@ impl<'a,A,R> FnOnce<A> for Box<FnBox<A,Output=R>+Send+'a> {
544
563
}
545
564
}
546
565
566
+ #[ unstable( feature = "coerce_unsized" , issue = "27732" ) ]
547
567
impl < T : ?Sized +Unsize < U > , U : ?Sized > CoerceUnsized < Box < U > > for Box < T > { }
548
568
549
569
#[ stable( feature = "box_slice_clone" , since = "1.3.0" ) ]
@@ -597,12 +617,14 @@ impl<T: Clone> Clone for Box<[T]> {
597
617
}
598
618
}
599
619
620
+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
600
621
impl < T : ?Sized > borrow:: Borrow < T > for Box < T > {
601
622
fn borrow ( & self ) -> & T {
602
623
& * * self
603
624
}
604
625
}
605
626
627
+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
606
628
impl < T : ?Sized > borrow:: BorrowMut < T > for Box < T > {
607
629
fn borrow_mut ( & mut self ) -> & mut T {
608
630
& mut * * self
0 commit comments