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

Wrap callbacks in struct fields in Option #453

Merged
merged 1 commit into from
Aug 15, 2019
Merged

Wrap callbacks in struct fields in Option #453

merged 1 commit into from
Aug 15, 2019

Conversation

alexcrichton
Copy link
Member

Pointed out by nightly rustc we're accidentally relying on undefined
behavior right now by calling mem::zeroed on structs which internally
contain non-nullable function references. Let's instead wrap everything
in Option so the zero bit pattern is valid for these structs.

Pointed out by nightly rustc we're accidentally relying on undefined
behavior right now by calling `mem::zeroed` on structs which internally
contain non-nullable function references. Let's instead wrap everything
in `Option` so the zero bit pattern is valid for these structs.
@ehuss ehuss merged commit 22cdd98 into master Aug 15, 2019
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.

2 participants