@@ -2487,13 +2487,6 @@ pub struct NonNull<T: ?Sized> {
2487
2487
pointer : NonZero < * const T > ,
2488
2488
}
2489
2489
2490
- #[ stable( feature = "nonnull" , since = "1.25.0" ) ]
2491
- impl < T : ?Sized > fmt:: Debug for NonNull < T > {
2492
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
2493
- fmt:: Pointer :: fmt ( & self . as_ptr ( ) , f)
2494
- }
2495
- }
2496
-
2497
2490
/// `NonNull` pointers are not `Send` because the data they reference may be aliased.
2498
2491
// NB: This impl is unnecessary, but should provide better error messages.
2499
2492
#[ stable( feature = "nonnull" , since = "1.25.0" ) ]
@@ -2575,6 +2568,13 @@ impl<T: ?Sized> Copy for NonNull<T> { }
2575
2568
#[ stable( feature = "nonnull" , since = "1.25.0" ) ]
2576
2569
impl < T : ?Sized , U : ?Sized > CoerceUnsized < NonNull < U > > for NonNull < T > where T : Unsize < U > { }
2577
2570
2571
+ #[ stable( feature = "nonnull" , since = "1.25.0" ) ]
2572
+ impl < T : ?Sized > fmt:: Debug for NonNull < T > {
2573
+ fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
2574
+ fmt:: Pointer :: fmt ( & self . as_ptr ( ) , f)
2575
+ }
2576
+ }
2577
+
2578
2578
#[ stable( feature = "nonnull" , since = "1.25.0" ) ]
2579
2579
impl < T : ?Sized > fmt:: Pointer for NonNull < T > {
2580
2580
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
0 commit comments