]> git.lizzy.rs Git - rust.git/blob - src/test/run-make/wasm-symbols-different-module/baz.rs
Rollup merge of #67233 - Luro02:cursor_traits, r=sfackler
[rust.git] / src / test / run-make / wasm-symbols-different-module / baz.rs
1 //! Issue #63562
2
3 #![crate_type = "cdylib"]
4
5 mod foo {
6     #[link(wasm_import_module = "sqlite")]
7     extern "C" {
8         pub fn allocate(size: usize) -> i32;
9         pub fn deallocate(ptr: i32, size: usize);
10     }
11 }
12
13 #[no_mangle]
14 pub extern "C" fn allocate() {
15     unsafe {
16         foo::allocate(1);
17         foo::deallocate(1, 2);
18     }
19 }
20
21 #[no_mangle]
22 pub extern "C" fn deallocate() {}