Add missing needs_drop check to DroplessArena.#158634
Open
nnethercote wants to merge 1 commit into
Open
Conversation
Three of the four public allocation functions in `DroplessArena` check that the allocated type doesn't implement `Drop`: `alloc`, `alloc_slice`, `alloc_from_iter`. This commit adds the missing check to `try_alloc_from_iter`. It also moves and reorders some lines in `alloc_from_iter` for consistency with the other methods.
Collaborator
|
|
Member
|
Quite sensible @bors r+ rollup |
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Jul 1, 2026
…, r=Nadrieril Add missing `needs_drop` check to `DroplessArena`. Three of the four public allocation functions in `DroplessArena` check that the allocated type doesn't implement `Drop`: `alloc`, `alloc_slice`, `alloc_from_iter`. This commit adds the missing check to `try_alloc_from_iter`. It also moves and reorders some lines in `alloc_from_iter` for consistency with the other methods. r? @Nadrieril
rust-bors Bot
pushed a commit
that referenced
this pull request
Jul 1, 2026
…uwer Rollup of 5 pull requests Successful merges: - #158169 (Fix debuginfo compression in bootstrap) - #158613 (Fix getrandom fallback test on platforms with `panic=abort`) - #158620 (Remove skip_norm_w/i/p().def_id with a helper) - #158633 (Remove unnecessary `Clone` derives on resolver types) - #158634 (Add missing `needs_drop` check to `DroplessArena`.)
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Jul 1, 2026
…, r=Nadrieril Add missing `needs_drop` check to `DroplessArena`. Three of the four public allocation functions in `DroplessArena` check that the allocated type doesn't implement `Drop`: `alloc`, `alloc_slice`, `alloc_from_iter`. This commit adds the missing check to `try_alloc_from_iter`. It also moves and reorders some lines in `alloc_from_iter` for consistency with the other methods. r? @Nadrieril
rust-bors Bot
pushed a commit
that referenced
this pull request
Jul 1, 2026
…uwer Rollup of 8 pull requests Successful merges: - #150075 (Implement clamp_to) - #158169 (Fix debuginfo compression in bootstrap) - #158397 (delegation: support simplest output `Self` mapping) - #158613 (Fix getrandom fallback test on platforms with `panic=abort`) - #158620 (Remove skip_norm_w/i/p().def_id with a helper) - #158633 (Remove unnecessary `Clone` derives on resolver types) - #158634 (Add missing `needs_drop` check to `DroplessArena`.) - #158647 (Document `strip_circumfix` behavior on overlapping prefix and suffix.)
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Jul 1, 2026
…, r=Nadrieril Add missing `needs_drop` check to `DroplessArena`. Three of the four public allocation functions in `DroplessArena` check that the allocated type doesn't implement `Drop`: `alloc`, `alloc_slice`, `alloc_from_iter`. This commit adds the missing check to `try_alloc_from_iter`. It also moves and reorders some lines in `alloc_from_iter` for consistency with the other methods. r? @Nadrieril
rust-bors Bot
pushed a commit
that referenced
this pull request
Jul 1, 2026
…uwer Rollup of 8 pull requests Successful merges: - #150075 (Implement clamp_to) - #156716 (tests: fix: parallel frontend test failures: different alloc ids) - #158397 (delegation: support simplest output `Self` mapping) - #158613 (Fix getrandom fallback test on platforms with `panic=abort`) - #158620 (Remove skip_norm_w/i/p().def_id with a helper) - #158633 (Remove unnecessary `Clone` derives on resolver types) - #158634 (Add missing `needs_drop` check to `DroplessArena`.) - #158647 (Document `strip_circumfix` behavior on overlapping prefix and suffix.)
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Jul 1, 2026
…, r=Nadrieril Add missing `needs_drop` check to `DroplessArena`. Three of the four public allocation functions in `DroplessArena` check that the allocated type doesn't implement `Drop`: `alloc`, `alloc_slice`, `alloc_from_iter`. This commit adds the missing check to `try_alloc_from_iter`. It also moves and reorders some lines in `alloc_from_iter` for consistency with the other methods. r? @Nadrieril
rust-bors Bot
pushed a commit
that referenced
this pull request
Jul 1, 2026
…uwer Rollup of 8 pull requests Successful merges: - #158294 (Use .drectve for MSVC DLL exports) - #156716 (tests: fix: parallel frontend test failures: different alloc ids) - #158397 (delegation: support simplest output `Self` mapping) - #158613 (Fix getrandom fallback test on platforms with `panic=abort`) - #158620 (Remove skip_norm_w/i/p().def_id with a helper) - #158633 (Remove unnecessary `Clone` derives on resolver types) - #158634 (Add missing `needs_drop` check to `DroplessArena`.) - #158647 (Document `strip_circumfix` behavior on overlapping prefix and suffix.)
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.
Three of the four public allocation functions in
DroplessArenacheck that the allocated type doesn't implementDrop:alloc,alloc_slice,alloc_from_iter. This commit adds the missing check totry_alloc_from_iter.It also moves and reorders some lines in
alloc_from_iterfor consistency with the other methods.r? @Nadrieril