-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Introduce MovingPtr as a safer alternative to moving typed values by raw pointer #20877
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
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
623935c
Introduce MovingPtr
james7132 a33001c
Apply suggestions from code review
james7132 0e04b09
Provide doc tests, better safety comments, and use associated functio…
james7132 8eb4823
Fix typo.
james7132 d8add27
Add missing safety comment
james7132 a9d7333
Update alignment comments
james7132 40531b3
Provide links to alignment docs
james7132 c5418ce
Add MovingPtr to the README
james7132 6c908a4
Markdown formatting
james7132 75e1082
Add an option to create a MovingPtr from a &mut MaybeUninit<T>
james7132 3a609be
Fix docs links
james7132 d88a9bf
Cleanup
james7132 8b5dd49
Merge branch 'main' into moving-ptr
james7132 8b16166
Docs fix
james7132 e39bc5f
Typo
james7132 a350b2d
Avoid leaking in TryFrom impl
james7132 a446641
typo
james7132 52904d7
Add a conversion from OwningPtr to MovingPtr
james7132 d0a9edd
drop_in_place docs
james7132 833a8a9
Add a safe assign_to alternative to write_to
james7132 a300c72
Add deconstruct_moving_ptr
james7132 5cc6fc9
Tuple
james7132 4e2a1c8
Remove unnecesary unsafe block
james7132 32cce6f
Merge branch 'main' into moving-ptr
james7132 ba12eaf
Fix doc links
james7132 6206fb4
Don't repeat
james7132 12f9094
Replace make_internal with from_value
james7132 9ce69b5
Merge branch 'main' into moving-ptr
james7132 6bb2fa3
size -> count
james7132 abc82c0
Merge branch 'main' into moving-ptr
alice-i-cecile File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The names
OwningPtrandMovingPtrmake sense individually, but together they don't make it immediately clear which one is typed and which one isn't. I don't have any better suggestions, though!