@@ -15,45 +15,45 @@ use std::alloc::{self, Layout};
1515
1616#[ cfg( target_arch = "wasm32" ) ]
1717#[ link( wasm_import_module = "[export]local:local/baz" ) ]
18- extern "C" {
18+ unsafe extern "C" {
1919 #[ link_name = "[task-return]foo" ]
2020 fn task_return_foo ( ptr : * mut u8 , len : usize ) ;
2121}
2222#[ cfg( not( target_arch = "wasm32" ) ) ]
23- extern "C" fn task_return_foo ( _ptr : * mut u8 , _len : usize ) {
23+ unsafe extern "C" fn task_return_foo ( _ptr : * mut u8 , _len : usize ) {
2424 unreachable ! ( )
2525}
2626
2727#[ cfg( target_arch = "wasm32" ) ]
2828#[ link( wasm_import_module = "local:local/baz" ) ]
29- extern "C" {
29+ unsafe extern "C" {
3030 #[ link_name = "[async]foo" ]
3131 fn import_foo ( params : * mut u8 , results : * mut u8 ) -> u32 ;
3232}
3333#[ cfg( not( target_arch = "wasm32" ) ) ]
34- extern "C" fn import_foo ( _params : * mut u8 , _results : * mut u8 ) -> u32 {
34+ unsafe extern "C" fn import_foo ( _params : * mut u8 , _results : * mut u8 ) -> u32 {
3535 unreachable ! ( )
3636}
3737
3838#[ cfg( target_arch = "wasm32" ) ]
3939#[ link( wasm_import_module = "$root" ) ]
40- extern "C" {
40+ unsafe extern "C" {
4141 #[ link_name = "[task-wait]" ]
4242 fn task_wait ( results : * mut i32 ) -> i32 ;
4343}
4444#[ cfg( not( target_arch = "wasm32" ) ) ]
45- extern "C" fn task_wait ( _results : * mut i32 ) -> i32 {
45+ unsafe extern "C" fn task_wait ( _results : * mut i32 ) -> i32 {
4646 unreachable ! ( )
4747}
4848
4949#[ cfg( target_arch = "wasm32" ) ]
5050#[ link( wasm_import_module = "$root" ) ]
51- extern "C" {
51+ unsafe extern "C" {
5252 #[ link_name = "[subtask-drop]" ]
5353 fn subtask_drop ( task : u32 ) ;
5454}
5555#[ cfg( not( target_arch = "wasm32" ) ) ]
56- extern "C" fn subtask_drop ( _task : u32 ) {
56+ unsafe extern "C" fn subtask_drop ( _task : u32 ) {
5757 unreachable ! ( )
5858}
5959
@@ -117,7 +117,7 @@ unsafe extern "C" fn export_foo(ptr: *mut u8, len: usize) {
117117
118118// Copied from `wit-bindgen`-generated output
119119#[ cfg( target_arch = "wasm32" ) ]
120- #[ link_section = "component-type:wit-bindgen:0.35.0:local:local:round-trip:encoded world" ]
120+ #[ unsafe ( link_section = "component-type:wit-bindgen:0.35.0:local:local:round-trip:encoded world" ) ]
121121#[ doc( hidden) ]
122122#[ allow(
123123 clippy:: octal_escapes,
0 commit comments