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

Replace as *... raw pointer-type changes with more explicit .cast() #685

Merged
merged 1 commit into from Nov 22, 2022

Conversation

MarijnS95
Copy link
Collaborator

.cast() allows changing the pointer type without hiding (accidental) mutability changes (noting that *mut still coerces to *.const).

For mutability changes Rust 1.65 included cast_mut() and cast_const(), but those would bump our MSRV too eagerly for now.

`.cast()` allows changing the pointer type without hiding (accidental)
mutability changes (noting that `*mut` still coerces to `*.const`).

For mutability changes Rust 1.65 included `cast_mut()` and
`cast_const()`, but those would bump our MSRV too eagerly for now.
@Ralith Ralith merged commit 8b45750 into master Nov 22, 2022
@Ralith Ralith deleted the as-cast branch November 22, 2022 18:52
MarijnS95 added a commit that referenced this pull request Nov 22, 2022
…)` (#685)

`.cast()` allows changing the pointer type without hiding (accidental)
mutability changes (noting that `*mut` still coerces to `*.const`).

For mutability changes Rust 1.65 included `cast_mut()` and
`cast_const()`, but those would bump our MSRV too eagerly for now.
@MarijnS95 MarijnS95 mentioned this pull request Nov 30, 2022
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