File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,9 @@ unsafe extern "Rust" {
31
31
#[ rustc_std_internal_symbol]
32
32
fn __rust_alloc_zeroed ( size : usize , align : usize ) -> * mut u8 ;
33
33
34
+ #[ rustc_nounwind]
34
35
#[ rustc_std_internal_symbol]
35
- static __rust_no_alloc_shim_is_unstable : u8 ;
36
+ fn __rust_no_alloc_shim_is_unstable_v2 ( ) ;
36
37
}
37
38
38
39
/// The global memory allocator.
@@ -88,7 +89,7 @@ pub unsafe fn alloc(layout: Layout) -> *mut u8 {
88
89
unsafe {
89
90
// Make sure we don't accidentally allow omitting the allocator shim in
90
91
// stable code until it is actually stabilized.
91
- core :: ptr :: read_volatile ( & __rust_no_alloc_shim_is_unstable ) ;
92
+ __rust_no_alloc_shim_is_unstable_v2 ( ) ;
92
93
93
94
__rust_alloc ( layout. size ( ) , layout. align ( ) )
94
95
}
@@ -171,7 +172,7 @@ pub unsafe fn alloc_zeroed(layout: Layout) -> *mut u8 {
171
172
unsafe {
172
173
// Make sure we don't accidentally allow omitting the allocator shim in
173
174
// stable code until it is actually stabilized.
174
- core :: ptr :: read_volatile ( & __rust_no_alloc_shim_is_unstable ) ;
175
+ __rust_no_alloc_shim_is_unstable_v2 ( ) ;
175
176
176
177
__rust_alloc_zeroed ( layout. size ( ) , layout. align ( ) )
177
178
}
You can’t perform that action at this time.
0 commit comments