Skip to content

Add unstable_offset_of feature to use the unstable offset_of macro#72

Merged
Gilnaa merged 1 commit into
Gilnaa:masterfrom
est31:master
May 17, 2023
Merged

Add unstable_offset_of feature to use the unstable offset_of macro#72
Gilnaa merged 1 commit into
Gilnaa:masterfrom
est31:master

Conversation

@est31

@est31 est31 commented May 17, 2023

Copy link
Copy Markdown
Contributor

Add a cargo feature unstable_offset_of to use the unstable core::mem::offset_of!() macro (rust-lang/rust#106655). This allows for unsized structs (#25) and many other things. It also helps with testing of the upstream offset_of macro: testing is now as easy as enabling this feature, one doesn't have to change the usages from memoffset::offset_of to core::mem::offset_of.

Comment thread src/offset_of.rs
@Gilnaa Gilnaa merged commit 55753a6 into Gilnaa:master May 17, 2023
@Gilnaa

Gilnaa commented May 17, 2023

Copy link
Copy Markdown
Owner

Thank you very much.
Will try to remember to publish it to crates.io tonight

@est31

est31 commented May 17, 2023

Copy link
Copy Markdown
Contributor Author

Thanks @Gilnaa for the fast review! ❤️

@Gilnaa

Gilnaa commented May 19, 2023

Copy link
Copy Markdown
Owner

Failed to remember that night :)
Anyway, published as v0.9.0, thanks again and have a nice weekend.

Comment thread src/offset_of.rs
Gilnaa added a commit that referenced this pull request May 19, 2023
`offset_of!` implementation was moved to an internal macro
`_memoffset__offset_of_impl!` in
[PR #72](#72).

This was done in order to have a single top-level macro that
doc-comments can be attached to.
@Gilnaa Gilnaa mentioned this pull request May 19, 2023
@est31

est31 commented May 21, 2023

Copy link
Copy Markdown
Contributor Author

@Gilnaa thanks for having done the release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants