[stdlib] List.extend
uses origin
on its UnsafePointer
logic.
#4043
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.
Hello,
this small commit is to integrate the
origin
parameter into the existing implementation.(during logic on
UnsafePointer
to theother
arg)For example, if
other^.__del__()
is added before the loop, an error comes onmove_pointee_into
:"uninitialized value other"
(preventing moving of values out of an maybe freed pointer)
The
origin
parameter makes sure thatother
is not__del__
whilewe use the
UnsafePointer
to it.Not sure if needed here, but it feels like a nice thing ! 👍