File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Expand file tree Collapse file tree 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};
191191use core:: fmt;
192192use core:: future:: Future ;
193193use core:: hash:: { Hash , Hasher } ;
194+ #[ cfg( not( bootstrap) ) ]
195+ use core:: marker:: PointerLike ;
194196use core:: marker:: { Tuple , Unsize } ;
195197use core:: mem:: { self , SizedTypeProperties } ;
196198use core:: ops:: {
@@ -2131,3 +2133,7 @@ impl<E: Error> Error for Box<E> {
21312133 Error :: provide ( & * * self , request) ;
21322134 }
21332135}
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 136136#![ feature( panic_internals) ]
137137#![ feature( pattern) ]
138138#![ feature( pin_coerce_unsized_trait) ]
139+ #![ feature( pointer_like_trait) ]
139140#![ feature( ptr_internals) ]
140141#![ feature( ptr_metadata) ]
141142#![ feature( ptr_sub_ptr) ]
Original file line number Diff line number Diff line change @@ -981,6 +981,18 @@ pub trait Tuple {}
981981) ]
982982pub trait PointerLike { }
983983
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+
984996/// A marker for types which can be used as types of `const` generic parameters.
985997///
986998/// These types must have a proper equivalence relation (`Eq`) and it must be automatically
You can’t perform that action at this time.
0 commit comments