about summary refs log tree commit diff
path: root/src/test/ui/async-await/async-block-control-flow-static-semantics.rs
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2022-07-27 17:55:01 +0200
committerGitHub <noreply@github.com>2022-07-27 17:55:01 +0200
commitef81fca760067e887e1dc69413f004327d23bb7e (patch)
treef422a1cde63dd156fc294db5719f34ce459c4653 /src/test/ui/async-await/async-block-control-flow-static-semantics.rs
parent2a220937c283803bfd5d1155e4a81e6287089504 (diff)
parent746afe8952a026c24fd229474f40658cbc9e12c7 (diff)
downloadrust-ef81fca760067e887e1dc69413f004327d23bb7e.tar.gz
rust-ef81fca760067e887e1dc69413f004327d23bb7e.zip
Rollup merge of #94247 - saethlin:chunksmut-aliasing, r=the8472
Fix slice::ChunksMut aliasing

Fixes https://github.com/rust-lang/rust/issues/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.
Diffstat (limited to 'src/test/ui/async-await/async-block-control-flow-static-semantics.rs')
0 files changed, 0 insertions, 0 deletions