Implement IntoIterator for [&[mut]] Box<[T; N], A>#134021
Implement IntoIterator for [&[mut]] Box<[T; N], A>#134021WaffleLapkin wants to merge 5 commits intorust-lang:mainfrom
IntoIterator for [&[mut]] Box<[T; N], A>#134021Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
6f3a44b to
576e704
Compare
This comment has been minimized.
This comment has been minimized.
|
☔ The latest upstream changes (presumably #136572) made this pull request unmergeable. Please resolve the merge conflicts. |
|
@scottmcm anything I can do to move this forward? |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
6bcd9c3 to
72ea626
Compare
|
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. |
72ea626 to
366152c
Compare
This comment has been minimized.
This comment has been minimized.
33ce55c to
a26c96f
Compare
|
@Mark-Simulacrum I don't think this requires edition handling or FCP, as per the FCP on the previous attempt at doing this:
@rustbot review |
…>` and `[T; N]` They'll be needed for `IntoIterator` impls.
a26c96f to
91e8eb2
Compare
|
I've also removed the complicated unsafe impl for now, making the |
This comment has been minimized.
This comment has been minimized.
Note: this removes warnings, as this breakage was deemed acceptable, see <rust-lang#124108 (comment)>
91e8eb2 to
f65b35f
Compare
There was a problem hiding this comment.
I don't think this requires edition handling or FCP, as per the FCP on the previous attempt at doing this:
I think we do need FCP or at least libs-api meeting nomination to re-confirm that the >1 year old FCP from 2024 is still valid. Maybe a Crater run. This is a breaking change and there was some post-initial-FCP discussion on whether we should do the unsizing impl (#124108 (comment)). Making two breaking changes here feels unfortunate so we should decide upfront which we want, even if we think the change is otherwise reasonable.
I guess the current version of this PR proposes neither option and instead has a dedicated new iterator type (BoxedArrayIntoIter). I think that's entirely net-new surface area, right? It also means we're missing a chunk of impls (e.g., DoubleEndedIterator) that we'd get 'for free' with vec::IntoIter.
Revival of #124108
I copied the
<[T; N] as IntoIterator>::Iter's impl, but this does not seem satisfying:IndexRangepublicr? @scottmcm
maybe you have better implementation ideas.