File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -275,6 +275,13 @@ impl<T: fmt::Debug + ?Sized> fmt::Debug for Box<T> {
275
275
}
276
276
}
277
277
278
+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
279
+ impl < T > fmt:: Pointer for Box < T > {
280
+ fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
281
+ fmt:: Pointer :: fmt ( & * self , f)
282
+ }
283
+ }
284
+
278
285
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
279
286
impl < T : ?Sized > Deref for Box < T > {
280
287
type Target = T ;
Original file line number Diff line number Diff line change @@ -94,6 +94,7 @@ use mem;
94
94
use clone:: Clone ;
95
95
use intrinsics;
96
96
use ops:: Deref ;
97
+ use core:: fmt;
97
98
use option:: Option :: { self , Some , None } ;
98
99
use marker:: { PhantomData , Send , Sized , Sync } ;
99
100
use nonzero:: NonZero ;
@@ -570,3 +571,10 @@ impl<T:?Sized> Deref for Unique<T> {
570
571
unsafe { mem:: transmute ( & * self . pointer ) }
571
572
}
572
573
}
574
+
575
+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
576
+ impl < T > fmt:: Pointer for Unique < T > {
577
+ fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
578
+ fmt:: Pointer :: fmt ( & * self . pointer , f)
579
+ }
580
+ }
You can’t perform that action at this time.
0 commit comments