core: drop unmapped ZSTs in array map#152487
Conversation
|
r? @scottmcm rustbot has assigned @scottmcm. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
I'll flip this to the same reviewer as #147071 |
|
|
core: drop unmapped ZSTs in array `map` Fixes rust-lang#152211. Alternative to rust-lang#152220 and rust-lang#152248. This makes the `Drain` type use the same ZST-handling strategy as `slice::IterMut`, which stores the remaining length instead of a one-past-the-end pointer when the type is a ZST. I've also removed the const-generic `N` parameter from `Drain` to avoid unnecessary monomorphizations.
core: drop unmapped ZSTs in array `map` Fixes rust-lang#152211. Alternative to rust-lang#152220 and rust-lang#152248. This makes the `Drain` type use the same ZST-handling strategy as `slice::IterMut`, which stores the remaining length instead of a one-past-the-end pointer when the type is a ZST. I've also removed the const-generic `N` parameter from `Drain` to avoid unnecessary monomorphizations.
…uwer Rollup of 4 pull requests Successful merges: - #152487 (core: drop unmapped ZSTs in array `map`) - #155716 (arm64e: set ptrauth ABI subtype on lib.rmeta Mach-O objects) - #155864 (Fix panic for doc attributes on where predicates) - #155865 (add test for accidentally fixed `binius_field` issue)
|
⌛ Testing commit b9ad3a9 with merge 44ae6c2... Workflow: https://github.com/rust-lang/rust/actions/runs/24994532499 |
core: drop unmapped ZSTs in array `map` Fixes #152211. Alternative to #152220 and #152248. This makes the `Drain` type use the same ZST-handling strategy as `slice::IterMut`, which stores the remaining length instead of a one-past-the-end pointer when the type is a ZST. I've also removed the const-generic `N` parameter from `Drain` to avoid unnecessary monomorphizations.
|
This pull request was unapproved. This PR was contained in a rollup (#155872), which was unapproved. Auto build was cancelled due to unapproval. Cancelled workflows: |
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
core: drop unmapped ZSTs in array `map` Fixes rust-lang#152211. Alternative to rust-lang#152220 and rust-lang#152248. This makes the `Drain` type use the same ZST-handling strategy as `slice::IterMut`, which stores the remaining length instead of a one-past-the-end pointer when the type is a ZST. I've also removed the const-generic `N` parameter from `Drain` to avoid unnecessary monomorphizations.
Rollup of 7 pull requests Successful merges: - #152487 (core: drop unmapped ZSTs in array `map`) - #155940 (refactor rustc_on_unimplemented's filtering) - #156020 (Improve source code for `librustdoc/visit_ast.rs`) - #156021 (Clean up some traits) - #156028 (Add a `Local::arg(i)` helper constructor) - #156037 (Add AcceptContext::expect_no_args) - #156040 (Add missing alias to mailmap)
|
Failed in #156056 (comment) with: |
|
@bors r- |
|
This pull request was unapproved. This PR was contained in a rollup (#156056), which was unapproved. |
Fixes #152211.
Alternative to #152220 and #152248.
This makes the
Draintype use the same ZST-handling strategy asslice::IterMut, which stores the remaining length instead of a one-past-the-end pointer when the type is a ZST. I've also removed the const-genericNparameter fromDrainto avoid unnecessary monomorphizations.