Skip to content

Commit

Permalink
Auto merge of #106934 - DrMeepster:offset_of, r=WaffleLapkin
Browse files Browse the repository at this point in the history
Add offset_of! macro (RFC 3308)

Implements rust-lang/rfcs#3308 (tracking issue #106655) by adding the built in macro `core::mem::offset_of`. Two of the future possibilities are also implemented:

* Nested field accesses (without array indexing)
* DST support (for `Sized` fields)

I wrote this a few months ago, before the RFC merged. Now that it's merged, I decided to rebase and finish it.

cc `@thomcc` (RFC author)
  • Loading branch information
bors committed Apr 22, 2023
2 parents eaedda4 + de608f4 commit 7a641f9
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 7a641f9

Please sign in to comment.