Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unstable_offset_of feature to use the unstable offset_of macro #72

Merged
merged 1 commit into from
May 17, 2023

Conversation

est31
Copy link
Contributor

@est31 est31 commented May 17, 2023

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.

@Gilnaa Gilnaa merged commit 55753a6 into Gilnaa:master May 17, 2023
@Gilnaa
Copy link
Owner

Gilnaa commented May 17, 2023

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

@est31
Copy link
Contributor Author

est31 commented May 17, 2023

Thanks @Gilnaa for the fast review! ❤️

@Gilnaa
Copy link
Owner

Gilnaa commented May 19, 2023

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

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
Copy link
Contributor Author

est31 commented May 21, 2023

@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