From cec902e6be36bd3bf2ccec1e3cb6669e18e94fe9 Mon Sep 17 00:00:00 2001 From: Elle Rhumsaa Date: Sat, 6 Sep 2025 14:30:56 +0000 Subject: [PATCH] main: refactor unsafe block for C offsets Uses the `&raw const` syntax to convert the pointer location of static offsets from C. --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index e20a6c88dc..9906ad5e2c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -279,7 +279,7 @@ macro_rules! linker_offsets( // TODO: UnsafeCell? static $name: u8; } - unsafe { &$name as *const u8 as usize } + (&raw const $name) as usize } )* }