File tree 2 files changed +5
-5
lines changed
crates/assert-instr-macro/src
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ pub fn assert_instr(
143
143
quote ! {
144
144
#attrs
145
145
#maybe_allow_deprecated
146
- #[ no_mangle]
146
+ #[ unsafe ( no_mangle) ]
147
147
#[ inline( never) ]
148
148
pub unsafe extern #abi fn #shim_name( #( #inputs) , * ) #ret {
149
149
#name:: <#( #const_vals) , * >( #( #input_vals) , * )
@@ -156,7 +156,7 @@ pub fn assert_instr(
156
156
157
157
#attrs
158
158
#maybe_allow_deprecated
159
- #[ no_mangle]
159
+ #[ unsafe ( no_mangle) ]
160
160
#[ inline( never) ]
161
161
pub unsafe extern #abi fn #shim_name( #( #inputs) , * ) #ret {
162
162
// The compiler in optimized mode by default runs a pass called
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ use core_arch::arch::wasm32::*;
8
8
9
9
static mut HEAD : * mut * mut u8 = 0 as _ ;
10
10
11
- #[ no_mangle]
11
+ #[ unsafe ( no_mangle) ]
12
12
pub unsafe extern "C" fn page_alloc ( ) -> * mut u8 {
13
13
if !HEAD . is_null ( ) {
14
14
let next = * HEAD ;
@@ -27,14 +27,14 @@ pub unsafe extern "C" fn page_alloc() -> *mut u8 {
27
27
( ( ret as u32 ) * page_size ( ) ) as * mut u8
28
28
}
29
29
30
- #[ no_mangle]
30
+ #[ unsafe ( no_mangle) ]
31
31
pub unsafe extern "C" fn page_free ( page : * mut u8 ) {
32
32
let page = page as * mut * mut u8 ;
33
33
* page = HEAD as * mut u8 ;
34
34
HEAD = page;
35
35
}
36
36
37
- #[ no_mangle]
37
+ #[ unsafe ( no_mangle) ]
38
38
pub unsafe extern "C" fn memory_used ( ) -> usize {
39
39
( page_size ( ) * ( memory_size ( 0 ) as u32 ) ) as usize
40
40
}
You can’t perform that action at this time.
0 commit comments