Skip to content

Add missing needs_drop check to DroplessArena.#158634

Open
nnethercote wants to merge 1 commit into
rust-lang:mainfrom
nnethercote:add-missing-needs_drop
Open

Add missing needs_drop check to DroplessArena.#158634
nnethercote wants to merge 1 commit into
rust-lang:mainfrom
nnethercote:add-missing-needs_drop

Conversation

@nnethercote

Copy link
Copy Markdown
Contributor

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

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.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 1, 2026
@rustbot

rustbot commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Nadrieril is currently at their maximum review capacity.
They may take a while to respond.

@Nadrieril

Copy link
Copy Markdown
Member

Quite sensible

@bors r+ rollup

@rust-bors

rust-bors Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

📌 Commit c6f92dc has been approved by Nadrieril

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 1, 2026
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.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants