3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -191,6 +191,8 @@ use core::error::{self, Error};
191
191
use core:: fmt;
192
192
use core:: future:: Future ;
193
193
use core:: hash:: { Hash , Hasher } ;
194
+ #[ cfg( not( bootstrap) ) ]
195
+ use core:: marker:: PointerLike ;
194
196
use core:: marker:: { Tuple , Unsize } ;
195
197
use core:: mem:: { self , SizedTypeProperties } ;
196
198
use core:: ops:: {
@@ -2131,3 +2133,7 @@ impl<E: Error> Error for Box<E> {
2131
2133
Error :: provide ( & * * self , request) ;
2132
2134
}
2133
2135
}
2136
+
2137
+ #[ cfg( not( bootstrap) ) ]
2138
+ #[ unstable( feature = "pointer_like_trait" , issue = "none" ) ]
2139
+ impl < T > PointerLike for Box < T > { }
Original file line number Diff line number Diff line change 136
136
#![ feature( panic_internals) ]
137
137
#![ feature( pattern) ]
138
138
#![ feature( pin_coerce_unsized_trait) ]
139
+ #![ feature( pointer_like_trait) ]
139
140
#![ feature( ptr_internals) ]
140
141
#![ feature( ptr_metadata) ]
141
142
#![ feature( ptr_sub_ptr) ]
Original file line number Diff line number Diff line change @@ -981,6 +981,18 @@ pub trait Tuple {}
981
981
) ]
982
982
pub trait PointerLike { }
983
983
984
+ #[ cfg( not( bootstrap) ) ]
985
+ marker_impls ! {
986
+ #[ unstable( feature = "pointer_like_trait" , issue = "none" ) ]
987
+ PointerLike for
988
+ usize ,
989
+ { T } & T ,
990
+ { T } & mut T ,
991
+ { T } * const T ,
992
+ { T } * mut T ,
993
+ { T : PointerLike } crate :: pin:: Pin <T >,
994
+ }
995
+
984
996
/// A marker for types which can be used as types of `const` generic parameters.
985
997
///
986
998
/// These types must have a proper equivalence relation (`Eq`) and it must be automatically
0 commit comments