struct offset jetbrains bug, revert to macro rules
This commit is contained in:
@@ -88,12 +88,21 @@ impl<T: Debug, const O: usize> Debug for VirtualOffset<T, O> {
|
||||
// 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>
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user