Info
This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: Is there way to get raw pointer to field without dereferencing struct
I am specifically ask about new &raw const
/&raw mut
syntax.
I know that I can just use addr_of in std::ptr - Rust macro.
E.g. if I have struct
struct S {
a: u32,
b: u32,
}
how I express core::ptr::addr_of!((*s).a)
using new syntax?
3 posts - 2 participants
🏷️ rust_feed