Skip to content

Commit ef81fca

Browse files
Rollup merge of #94247 - saethlin:chunksmut-aliasing, r=the8472
Fix slice::ChunksMut aliasing Fixes #94231, details in that issue. cc `@RalfJung` This isn't done just yet, all the safety comments are placeholders. But otherwise, it seems to work. I don't really like this approach though. There's a lot of unsafe code where there wasn't before, but as far as I can tell the only other way to uphold the aliasing requirement imposed by `__iterator_get_unchecked` is to use raw slices, which I think require the same amount of unsafe code. All that would do is tie the `len` and `ptr` fields together. Oh I just looked and I'm pretty sure that `ChunksExactMut`, `RChunksMut`, and `RChunksExactMut` also need to be patched. Even more reason to put up a draft.
2 parents 2a22093 + 746afe8 commit ef81fca

File tree

2 files changed

+166
-72
lines changed

2 files changed

+166
-72
lines changed

0 commit comments

Comments
 (0)