struct offset jetbrains bug, revert to macro rules

This commit is contained in:
Intege-rs
2025-02-11 13:41:05 -05:00
parent 643bfbe6b7
commit d8b3a9201e

View File

@@ -88,12 +88,21 @@ impl<T: Debug, const O: usize> Debug for VirtualOffset<T, O> {
// Macro // Macro
// ============================== // ==============================
pub macro struct_offset { #[macro_export]
macro_rules! struct_offset {
($offset:literal, $type:ty) => { ($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>
// }
// }