Skip to content

Use memoffset::offset_of instead of homegrown macro #1416

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

Merged
merged 1 commit into from
Apr 4, 2021

Conversation

asomers
Copy link
Member

@asomers asomers commented Apr 4, 2021

The homegrown macro was fine in 2016, but at some point it technically
became UB. The memoffset crate does the same thing, but avoids UB when
using rustc 1.51.0 or later.

Fixes #1415

The homegrown macro was fine in 2016, but at some point it technically
became UB.  The memoffset crate does the same thing, but avoids UB when
using rustc 1.51.0 or later.

Fixes nix-rust#1415
@asomers
Copy link
Member Author

asomers commented Apr 4, 2021

bors r+

@bors bors bot merged commit b3f9359 into nix-rust:master Apr 4, 2021
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.

offset_of is unsound
1 participant