Feature gates tracked by this issue:
This is a tracking issue for the offset_of! macro which evaluates to a constant
containing the offset in bytes of a field inside some type (rust-lang/rfcs#3308).
Public API
// core::mem
pub macro offset_of($Container:ty, $field:tt $(,)?) {
// ...implementation defined...
}
Steps / History
Possible future extensions / work
Unresolved Questions
Feature gates tracked by this issue:
#![feature(offset_of)]-> moved to Tracking Issue for enum access in offset_of #120141#![feature(offset_of_enum)]This is a tracking issue for the
offset_of!macro which evaluates to a constantcontaining the offset in bytes of a field inside some type (rust-lang/rfcs#3308).
Public API
Steps / History
offset_of_enum: Feature gate enums in offset_of #117537Possible future extensions / work
struct Example(u32, [u8]))enums: Support enum variants in offset_of! #114208Unresolved Questions
Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩