@@ -111,18 +111,18 @@ struct Exception {
111111mod imp {
112112 #[ repr( transparent) ]
113113 #[ derive( Copy , Clone ) ]
114- pub struct ptr_t ( * mut u8 ) ;
114+ pub ( super ) struct ptr_t ( * mut u8 ) ;
115115
116116 impl ptr_t {
117- pub const fn null ( ) -> Self {
117+ pub ( super ) const fn null ( ) -> Self {
118118 Self ( core:: ptr:: null_mut ( ) )
119119 }
120120
121- pub const fn new ( ptr : * mut u8 ) -> Self {
121+ pub ( super ) const fn new ( ptr : * mut u8 ) -> Self {
122122 Self ( ptr)
123123 }
124124
125- pub const fn raw ( self ) -> * mut u8 {
125+ pub ( super ) const fn raw ( self ) -> * mut u8 {
126126 self . 0
127127 }
128128 }
@@ -133,18 +133,18 @@ mod imp {
133133 // On 64-bit systems, SEH represents pointers as 32-bit offsets from `__ImageBase`.
134134 #[ repr( transparent) ]
135135 #[ derive( Copy , Clone ) ]
136- pub struct ptr_t ( u32 ) ;
136+ pub ( super ) struct ptr_t ( u32 ) ;
137137
138138 extern "C" {
139139 pub static __ImageBase: u8 ;
140140 }
141141
142142 impl ptr_t {
143- pub const fn null ( ) -> Self {
143+ pub ( super ) const fn null ( ) -> Self {
144144 Self ( 0 )
145145 }
146146
147- pub fn new ( ptr : * mut u8 ) -> Self {
147+ pub ( super ) fn new ( ptr : * mut u8 ) -> Self {
148148 // We need to expose the provenance of the pointer because it is not carried by
149149 // the `u32`, while the FFI needs to have this provenance to excess our statics.
150150 //
@@ -159,7 +159,7 @@ mod imp {
159159 Self ( offset as u32 )
160160 }
161161
162- pub const fn raw ( self ) -> u32 {
162+ pub ( super ) const fn raw ( self ) -> u32 {
163163 self . 0
164164 }
165165 }
@@ -168,21 +168,21 @@ mod imp {
168168use imp:: ptr_t;
169169
170170#[ repr( C ) ]
171- pub struct _ThrowInfo {
171+ struct _ThrowInfo {
172172 pub attributes : c_uint ,
173173 pub pmfnUnwind : ptr_t ,
174174 pub pForwardCompat : ptr_t ,
175175 pub pCatchableTypeArray : ptr_t ,
176176}
177177
178178#[ repr( C ) ]
179- pub struct _CatchableTypeArray {
179+ struct _CatchableTypeArray {
180180 pub nCatchableTypes : c_int ,
181181 pub arrayOfCatchableTypes : [ ptr_t ; 1 ] ,
182182}
183183
184184#[ repr( C ) ]
185- pub struct _CatchableType {
185+ struct _CatchableType {
186186 pub properties : c_uint ,
187187 pub pType : ptr_t ,
188188 pub thisDisplacement : _PMD ,
@@ -191,14 +191,14 @@ pub struct _CatchableType {
191191}
192192
193193#[ repr( C ) ]
194- pub struct _PMD {
194+ struct _PMD {
195195 pub mdisp : c_int ,
196196 pub pdisp : c_int ,
197197 pub vdisp : c_int ,
198198}
199199
200200#[ repr( C ) ]
201- pub struct _TypeDescriptor {
201+ struct _TypeDescriptor {
202202 pub pVFTable : * const u8 ,
203203 pub spare : * mut u8 ,
204204 pub name : [ u8 ; 11 ] ,
@@ -290,7 +290,7 @@ cfg_if::cfg_if! {
290290
291291// FIXME(static_mut_refs): Do not allow `static_mut_refs` lint
292292#[ allow( static_mut_refs) ]
293- pub unsafe fn panic ( data : Box < dyn Any + Send > ) -> u32 {
293+ pub ( crate ) unsafe fn panic ( data : Box < dyn Any + Send > ) -> u32 {
294294 use core:: intrinsics:: atomic_store_seqcst;
295295
296296 // _CxxThrowException executes entirely on this stack frame, so there's no
@@ -352,7 +352,7 @@ pub unsafe fn panic(data: Box<dyn Any + Send>) -> u32 {
352352 _CxxThrowException ( throw_ptr, ( & raw mut THROW_INFO ) as * mut _ ) ;
353353}
354354
355- pub unsafe fn cleanup ( payload : * mut u8 ) -> Box < dyn Any + Send > {
355+ pub ( crate ) unsafe fn cleanup ( payload : * mut u8 ) -> Box < dyn Any + Send > {
356356 // A null payload here means that we got here from the catch (...) of
357357 // __rust_try. This happens when a non-Rust foreign exception is caught.
358358 if payload. is_null ( ) {
0 commit comments