Unnamed repository; edit this file 'description' to name the repository.
Auto merge of #114795 - RalfJung:cell-swap, r=dtolnay
make Cell::swap panic if the Cells partially overlap The following function ought to be sound: ```rust fn as_cell_of_array<T, const N: usize>(c: &[Cell<T>; N]) -> &Cell<[T; N]> { unsafe { transmute(c) } } ``` However, due to `Cell::swap`, it currently is not -- safe code can [cause a use-after-free](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=c9415799722d985ff7d2c2c997b724ca). This PR fixes that. Fixes https://github.com/rust-lang/rust/issues/80778
bors 2023-08-29
parent 123fc3d · parent 1490c09 · commit 288477b
0 files changed, 0 insertions, 0 deletions