File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11use crate :: marker:: PhantomData ;
2- use crate :: ptr;
32
43#[ lang = "preload_type" ]
4+ #[ unstable( feature = "offload" , issue = "124509" ) ]
55pub struct Preload < ' a , T : ?Sized > {
66 cpu_ptr : * const T ,
77 _marker : PhantomData < & ' a T > ,
88}
99
1010#[ lang = "preload_mut_type" ]
11+ #[ unstable( feature = "offload" , issue = "124509" ) ]
1112pub struct PreloadMut < ' a , T : ?Sized > {
1213 cpu_ptr : * mut T ,
1314 _marker : PhantomData < & ' a mut T > ,
1415}
16+
17+ #[ lang = "preload" ]
18+ #[ unstable( feature = "offload" , issue = "124509" ) ]
19+ pub fn preload < ' a , T : ?Sized > ( x : & ' a T ) -> Preload < ' a , T > {
20+ Preload { cpu_ptr : x as * const T , _marker : PhantomData }
21+ }
22+
23+ #[ lang = "preload_mut" ]
24+ #[ unstable( feature = "offload" , issue = "124509" ) ]
25+ pub fn preload_mut < ' a , T : ?Sized > ( x : & ' a mut T ) -> PreloadMut < ' a , T > {
26+ PreloadMut { cpu_ptr : x as * mut T , _marker : PhantomData }
27+ }
You can’t perform that action at this time.
0 commit comments