split core::ptr module into multiple files#61159
Merged
bors merged 1 commit intorust-lang:masterfrom May 28, 2019
Merged
Conversation
Contributor
|
(rust_highfive has picked a reviewer for you, use r? to override) |
RalfJung
commented
May 25, 2019
| impl<T: ?Sized> From<Unique<T>> for NonNull<T> { | ||
| #[inline] | ||
| fn from(unique: Unique<T>) -> Self { | ||
| unsafe { NonNull::new_unchecked(unique.as_ptr()) } |
Member
Author
There was a problem hiding this comment.
I had to rewrite this using the public API of Unique.
RalfJung
commented
May 25, 2019
| } | ||
|
|
||
| /// Acquires the underlying `*mut` pointer. | ||
| #[inline] |
Member
Author
There was a problem hiding this comment.
I made this and the other methods here inline for consistency with NonNull.
RalfJung
commented
May 25, 2019
| impl<'a, T: ?Sized> From<NonNull<T>> for Unique<T> { | ||
| #[inline] | ||
| fn from(p: NonNull<T>) -> Self { | ||
| unsafe { Unique::new_unchecked(p.as_ptr()) } |
Member
Author
There was a problem hiding this comment.
I had to adjust this to use the public API of NonNull.
Contributor
Member
|
@bors: r+ |
Collaborator
|
📌 Commit c2e7eb6 has been approved by |
Centril
added a commit
to Centril/rust
that referenced
this pull request
May 28, 2019
split core::ptr module into multiple files Cc @Centril
Centril
added a commit
to Centril/rust
that referenced
this pull request
May 28, 2019
split core::ptr module into multiple files Cc @Centril
bors
added a commit
that referenced
this pull request
May 28, 2019
Rollup of 4 pull requests Successful merges: - #61123 (Allow to specify profiling data output directory as -Zself-profile argument.) - #61159 (split core::ptr module into multiple files) - #61164 (rename Scalar::Bits to Scalar::Raw and bits field to data) - #61250 (Remove special case for *ios* builds in run-make-fulldeps/print-target-list Makefile) Failed merges: r? @ghost
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cc @Centril