From d8b3a9201e95005e96585b5d4ffcb78490687c80 Mon Sep 17 00:00:00 2001 From: Intege-rs Date: Tue, 11 Feb 2025 13:41:05 -0500 Subject: [PATCH] struct offset jetbrains bug, revert to macro rules --- sub/core/src/pstruct.rs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sub/core/src/pstruct.rs b/sub/core/src/pstruct.rs index 4cfd550..96c3069 100644 --- a/sub/core/src/pstruct.rs +++ b/sub/core/src/pstruct.rs @@ -88,12 +88,21 @@ impl Debug for VirtualOffset { // Macro // ============================== -pub macro struct_offset { +#[macro_export] +macro_rules! struct_offset { ($offset:literal, $type:ty) => { - VirtualOffset<$type, $offset> + $crate::sot::VirtualOffset<$type, $offset> } } - +pub use struct_offset; + + +// // Jetbrains does not auto complete this... Hygiene bug? +// pub macro struct_offset { +// ($offset:literal, $type:ty) => { +// VirtualOffset<$type, $offset> +// } +// }