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

Fix as_ptr() -> as_mut_ptr() finding from Miri. #30

Merged
merged 1 commit into from
Feb 28, 2020
Merged

Fix as_ptr() -> as_mut_ptr() finding from Miri. #30

merged 1 commit into from
Feb 28, 2020

Conversation

jodysankey
Copy link

I'm adding a dependency on half to a large project and wanted to give it a quick
check with miri. The miri stacked borrows checker had an issue with using a non
mutable pointer in the mutable reinterpret cast. Its not clear to me if this
was really indicative of a problem, but the version miri is happy with does look
better to me.

(note there were two other miri failures but they look like a problem
with miri itself - rust-lang/rust#69532)

I'm adding a dependency on half to a large project and wanted to give it a quick
check with miri. The miri stacked borrows checker had an issue with using a non
mutable pointer in the mutable reinterpret cast. Its not clear to me if this
was really indicative of a problem, but the version miri is happy with does look
better to me.

(note there were two other miri failures but they look like a problem
with miri itself - rust-lang/rust#69532)
@starkat99
Copy link
Owner

good catch, I'm surprised Rust allows a *const to *mut cast without at least a warning

@starkat99 starkat99 merged commit c333c8f into starkat99:master Feb 28, 2020
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