struct offset jetbrains bug, revert to macro rules
This commit is contained in:
1 parent
643bfbe6b7
commit
d8b3a9201e
1 file changed
+11
-2
+11
-2
@@ -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>
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Reference in new issue
Block a user