Skip to content

Do not use mem::transmute on non #[repr(C)] structs #1429

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
Dec 21, 2017

Conversation

weiznich
Copy link
Member

Neither PgConnection nor PgMetadataLookup are marked as #[repr(C)] so
this is at least implemetation defined behaviour.

(The implementation of std::path::Path also changed)

@weiznich weiznich requested a review from a team December 20, 2017 21:26
Copy link
Member

@sgrif sgrif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation of Path::new is the only reason I considered this OK, so if that implementation changed to do the same thing this seems fine.

@sgrif
Copy link
Member

sgrif commented Dec 20, 2017

Can you please update your commit message to include a link to rust-lang/rust#44890 as context?

Neither PgConnection nor PgMetadataLookup are marked as `#[repr(C)]` so
this is at least implemetation defined behaviour.

(The implementation of `std::path::Path` changed in rust-lang/rust#44890)
@weiznich weiznich force-pushed the bugfix/fix_pg_metadata_lookup branch from eb97d8f to 25b07c4 Compare December 20, 2017 22:22
@weiznich
Copy link
Member Author

Can you please update your commit message to include a link to rust-lang/rust#44890 as context?

Done

@sgrif
Copy link
Member

sgrif commented Dec 20, 2017

Feel free to merge when CI is green

@weiznich weiznich merged commit aba6627 into diesel-rs:master Dec 21, 2017
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