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

use transmute for ptr::invalid #8

Merged
merged 3 commits into from
May 21, 2022
Merged

use transmute for ptr::invalid #8

merged 3 commits into from
May 21, 2022

Conversation

RalfJung
Copy link
Collaborator

This syncs with rust-lang/rust#97219

@RalfJung
Copy link
Collaborator Author

Ah, Rust 1.31 doesn't have transmute in CTFE yet. That only became stable in 1.46.0.

We could implement it via a union instead.

@RalfJung
Copy link
Collaborator Author

Actually that won't help; unions and transmute inside const fn both only became stable in rust-lang/rust#85769 (Rust 1.56).

So on older Rust, it is not possible to implement this as a const fn.

Miri only works on nightly so we will have the feature there
@Gankra
Copy link
Owner

Gankra commented May 21, 2022

thanks! i'll try to cut a release some time this weekend

@RalfJung RalfJung deleted the invalid branch May 29, 2022 06:30
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.

None yet

2 participants