Files
rust/library/core/src
bors f6faef4475 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
2023-08-29 07:53:56 +00:00
..
2022-10-29 09:23:12 +02:00
2023-05-12 19:37:02 -07:00
2023-08-25 15:45:41 +08:00
2023-08-18 09:19:09 +02:00
2023-08-23 20:05:14 -04:00
2023-08-11 07:26:51 +08:00
2023-08-13 13:07:53 -06:00
2022-11-20 10:28:14 +01:00
2023-05-12 19:37:02 -07:00
2022-05-22 07:18:32 -03:00
2023-04-16 07:20:26 +00:00
2023-07-28 14:46:17 +02:00
2023-07-08 12:10:12 +09:00
2023-08-15 08:21:41 +02:00
2023-04-16 06:49:27 +00:00
2023-08-23 20:05:14 -04:00
2023-05-18 01:30:12 -04:00
2023-08-18 15:22:58 +08:00
2023-07-12 21:38:55 -04:00