File tree Expand file tree Collapse file tree 3 files changed +19
-20
lines changed
cmse-nonsecure/cmse-nonsecure-entry Expand file tree Collapse file tree 3 files changed +19
-20
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,24 @@ pub struct ManuallyDrop<T: PointeeSized> {
119119}
120120impl < T : Copy + PointeeSized > Copy for ManuallyDrop < T > { }
121121
122+ #[ repr( transparent) ]
123+ #[ rustc_layout_scalar_valid_range_start( 1 ) ]
124+ #[ rustc_nonnull_optimization_guaranteed]
125+ pub struct NonNull < T : ?Sized > {
126+ pointer : * const T ,
127+ }
128+ impl < T : ?Sized > Copy for NonNull < T > { }
129+
130+ #[ repr( transparent) ]
131+ #[ rustc_layout_scalar_valid_range_start( 1 ) ]
132+ #[ rustc_nonnull_optimization_guaranteed]
133+ pub struct NonZero < T > ( T ) ;
134+
135+ pub struct Unique < T : ?Sized > {
136+ pub pointer : NonNull < T > ,
137+ pub _marker : PhantomData < T > ,
138+ }
139+
122140#[ lang = "unsafe_cell" ]
123141#[ repr( transparent) ]
124142pub struct UnsafeCell < T : PointeeSized > {
Original file line number Diff line number Diff line change @@ -87,31 +87,13 @@ mod prelude {
8787 fn clone ( & self ) -> Self ;
8888 }
8989
90- #[ repr( transparent) ]
91- #[ rustc_layout_scalar_valid_range_start( 1 ) ]
92- #[ rustc_nonnull_optimization_guaranteed]
93- pub struct NonNull < T : ?Sized > {
94- pointer : * const T ,
95- }
96- impl < T : ?Sized > Copy for NonNull < T > { }
97-
98- #[ repr( transparent) ]
99- #[ rustc_layout_scalar_valid_range_start( 1 ) ]
100- #[ rustc_nonnull_optimization_guaranteed]
101- pub struct NonZero < T > ( T ) ;
102-
10390 // This just stands in for a non-trivial type.
10491 pub struct Vec < T > {
10592 ptr : NonNull < T > ,
10693 cap : usize ,
10794 len : usize ,
10895 }
10996
110- pub struct Unique < T : ?Sized > {
111- pub pointer : NonNull < T > ,
112- pub _marker : PhantomData < T > ,
113- }
114-
11597 #[ lang = "global_alloc_ty" ]
11698 pub struct Global ;
11799
Original file line number Diff line number Diff line change @@ -31,9 +31,8 @@ async unsafe extern "cmse-nonsecure-entry" fn async_is_not_allowed() {
3131// this file, but they may be moved into `minicore` if/when other `#[no_core]` tests want to use
3232// them.
3333
34- // NOTE: in `core` this type uses `NonNull`.
3534#[ lang = "ResumeTy" ]
36- pub struct ResumeTy ( * mut Context < ' static > ) ;
35+ pub struct ResumeTy ( NonNull < Context < ' static > > ) ;
3736
3837#[ lang = "future_trait" ]
3938pub trait Future {
You can’t perform that action at this time.
0 commit comments