Skip to content

slice::from_raw_parts is preferred over transmuting a fresh raw::Slice #23333

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 2 commits into from
Mar 14, 2015

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Mar 13, 2015

at least that's what the docs say: http://doc.rust-lang.org/std/slice/fn.from_raw_parts.html

A few situations got prettier. In some situations the mutability of the resulting and source pointers differed (and was cast away by transmute), the mutability matches now.

@rust-highfive
Copy link
Contributor

r? @pcwalton

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member

@bors: r+ 85080fa

Thanks!

@bors
Copy link
Collaborator

bors commented Mar 14, 2015

⌛ Testing commit 85080fa with merge 766a4e1...

bors added a commit that referenced this pull request Mar 14, 2015
at least that's what the docs say: http://doc.rust-lang.org/std/slice/fn.from_raw_parts.html

A few situations got prettier. In some situations the mutability of the resulting and source pointers differed (and was cast away by transmute), the mutability matches now.
@bors bors merged commit 85080fa into rust-lang:master Mar 14, 2015
@oli-obk oli-obk deleted the slice_from_raw_parts branch July 3, 2015 07:48
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.

5 participants