@@ -111,18 +111,18 @@ struct Exception {
111
111
mod imp {
112
112
#[ repr( transparent) ]
113
113
#[ derive( Copy , Clone ) ]
114
- pub struct ptr_t ( * mut u8 ) ;
114
+ pub ( super ) struct ptr_t ( * mut u8 ) ;
115
115
116
116
impl ptr_t {
117
- pub const fn null ( ) -> Self {
117
+ pub ( super ) const fn null ( ) -> Self {
118
118
Self ( core:: ptr:: null_mut ( ) )
119
119
}
120
120
121
- pub const fn new ( ptr : * mut u8 ) -> Self {
121
+ pub ( super ) const fn new ( ptr : * mut u8 ) -> Self {
122
122
Self ( ptr)
123
123
}
124
124
125
- pub const fn raw ( self ) -> * mut u8 {
125
+ pub ( super ) const fn raw ( self ) -> * mut u8 {
126
126
self . 0
127
127
}
128
128
}
@@ -133,18 +133,18 @@ mod imp {
133
133
// On 64-bit systems, SEH represents pointers as 32-bit offsets from `__ImageBase`.
134
134
#[ repr( transparent) ]
135
135
#[ derive( Copy , Clone ) ]
136
- pub struct ptr_t ( u32 ) ;
136
+ pub ( super ) struct ptr_t ( u32 ) ;
137
137
138
138
extern "C" {
139
- pub static __ImageBase: u8 ;
139
+ static __ImageBase: u8 ;
140
140
}
141
141
142
142
impl ptr_t {
143
- pub const fn null ( ) -> Self {
143
+ pub ( super ) const fn null ( ) -> Self {
144
144
Self ( 0 )
145
145
}
146
146
147
- pub fn new ( ptr : * mut u8 ) -> Self {
147
+ pub ( super ) fn new ( ptr : * mut u8 ) -> Self {
148
148
// We need to expose the provenance of the pointer because it is not carried by
149
149
// the `u32`, while the FFI needs to have this provenance to excess our statics.
150
150
//
@@ -159,7 +159,7 @@ mod imp {
159
159
Self ( offset as u32 )
160
160
}
161
161
162
- pub const fn raw ( self ) -> u32 {
162
+ pub ( super ) const fn raw ( self ) -> u32 {
163
163
self . 0
164
164
}
165
165
}
@@ -168,21 +168,21 @@ mod imp {
168
168
use imp:: ptr_t;
169
169
170
170
#[ repr( C ) ]
171
- pub struct _ThrowInfo {
171
+ struct _ThrowInfo {
172
172
pub attributes : c_uint ,
173
173
pub pmfnUnwind : ptr_t ,
174
174
pub pForwardCompat : ptr_t ,
175
175
pub pCatchableTypeArray : ptr_t ,
176
176
}
177
177
178
178
#[ repr( C ) ]
179
- pub struct _CatchableTypeArray {
179
+ struct _CatchableTypeArray {
180
180
pub nCatchableTypes : c_int ,
181
181
pub arrayOfCatchableTypes : [ ptr_t ; 1 ] ,
182
182
}
183
183
184
184
#[ repr( C ) ]
185
- pub struct _CatchableType {
185
+ struct _CatchableType {
186
186
pub properties : c_uint ,
187
187
pub pType : ptr_t ,
188
188
pub thisDisplacement : _PMD ,
@@ -191,14 +191,14 @@ pub struct _CatchableType {
191
191
}
192
192
193
193
#[ repr( C ) ]
194
- pub struct _PMD {
194
+ struct _PMD {
195
195
pub mdisp : c_int ,
196
196
pub pdisp : c_int ,
197
197
pub vdisp : c_int ,
198
198
}
199
199
200
200
#[ repr( C ) ]
201
- pub struct _TypeDescriptor {
201
+ struct _TypeDescriptor {
202
202
pub pVFTable : * const u8 ,
203
203
pub spare : * mut u8 ,
204
204
pub name : [ u8 ; 11 ] ,
@@ -288,7 +288,7 @@ cfg_if::cfg_if! {
288
288
}
289
289
}
290
290
291
- pub unsafe fn panic ( data : Box < dyn Any + Send > ) -> u32 {
291
+ pub ( crate ) unsafe fn panic ( data : Box < dyn Any + Send > ) -> u32 {
292
292
use core:: intrinsics:: atomic_store_seqcst;
293
293
294
294
// _CxxThrowException executes entirely on this stack frame, so there's no
@@ -350,7 +350,7 @@ pub unsafe fn panic(data: Box<dyn Any + Send>) -> u32 {
350
350
_CxxThrowException ( throw_ptr, ( & raw mut THROW_INFO ) as * mut _ ) ;
351
351
}
352
352
353
- pub unsafe fn cleanup ( payload : * mut u8 ) -> Box < dyn Any + Send > {
353
+ pub ( crate ) unsafe fn cleanup ( payload : * mut u8 ) -> Box < dyn Any + Send > {
354
354
// A null payload here means that we got here from the catch (...) of
355
355
// __rust_try. This happens when a non-Rust foreign exception is caught.
356
356
if payload. is_null ( ) {
0 commit comments