@@ -114,15 +114,15 @@ mod imp {
114
114
pub 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
}
@@ -140,11 +140,11 @@ mod imp {
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 ] ,
@@ -290,7 +290,7 @@ cfg_if::cfg_if! {
290
290
291
291
// FIXME(static_mut_refs): Do not allow `static_mut_refs` lint
292
292
#[ 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 {
294
294
use core:: intrinsics:: atomic_store_seqcst;
295
295
296
296
// _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 {
352
352
_CxxThrowException ( throw_ptr, ( & raw mut THROW_INFO ) as * mut _ ) ;
353
353
}
354
354
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 > {
356
356
// A null payload here means that we got here from the catch (...) of
357
357
// __rust_try. This happens when a non-Rust foreign exception is caught.
358
358
if payload. is_null ( ) {
0 commit comments