From 40038d3fdcbb85d28c217393479ee4951daab563 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=AA=E3=82=AD=E8=90=8C?= Date: Mon, 1 Sep 2025 17:17:54 +0200 Subject: [PATCH] fix new compilation errors in haku-wasm --- crates/haku-wasm/src/lib.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/crates/haku-wasm/src/lib.rs b/crates/haku-wasm/src/lib.rs index 0e21b02..33cbec9 100644 --- a/crates/haku-wasm/src/lib.rs +++ b/crates/haku-wasm/src/lib.rs @@ -496,22 +496,24 @@ unsafe extern "C" fn haku_num_diagnostics(instance: *const Instance) -> u32 { #[unsafe(no_mangle)] unsafe extern "C" fn haku_diagnostic_start(instance: *const Instance, index: u32) -> u32 { - (*instance).diagnostics2[index as usize].span().start + (&(*instance).diagnostics2)[index as usize].span().start } #[unsafe(no_mangle)] unsafe extern "C" fn haku_diagnostic_end(instance: *const Instance, index: u32) -> u32 { - (*instance).diagnostics2[index as usize].span().end + (&(*instance).diagnostics2)[index as usize].span().end } #[unsafe(no_mangle)] unsafe extern "C" fn haku_diagnostic_message(instance: *const Instance, index: u32) -> *const u8 { - (*instance).diagnostics2[index as usize].message().as_ptr() + (&(*instance).diagnostics2)[index as usize] + .message() + .as_ptr() } #[unsafe(no_mangle)] unsafe extern "C" fn haku_diagnostic_message_len(instance: *const Instance, index: u32) -> u32 { - (*instance).diagnostics2[index as usize].message().len() as u32 + (&(*instance).diagnostics2)[index as usize].message().len() as u32 } #[unsafe(no_mangle)]