Commit 1c4af67
authored
Rollup merge of #158634 - nnethercote:add-missing-needs_drop, 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? @Nadrieril1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
545 | 548 | | |
546 | 549 | | |
547 | 550 | | |
548 | | - | |
549 | | - | |
550 | 551 | | |
551 | 552 | | |
552 | 553 | | |
| |||
577 | 578 | | |
578 | 579 | | |
579 | 580 | | |
| 581 | + | |
580 | 582 | | |
581 | 583 | | |
582 | 584 | | |
| |||
0 commit comments