rust/tests/ui/async-await
Michael Goulet 4a01a38466
Rollup merge of #111087 - ibraheemdev:patch-15, r=dtolnay
Implement `Sync` for `mpsc::Sender`

`mpsc::Sender` is currently `!Sync` because the previous implementation contained an optimization where the channel started out as single-producer and was dynamically upgraded on the first clone, which relied on a unique reference to the sender. This optimization is one of the main reasons the old implementation was so complex and was removed in #93563. `mpsc::Sender` can now soundly implement `Sync`.

Note for any potential confusion, this chance does *not* add MPMC behavior. This only affects the already `Send + Clone` *sender*, not *receiver*.

It's technically possible to rely on the `!Sync` behavior in the same way as a `PhantomData<*mut T>`, but that seems very unlikely in practice. Either way, this change is insta-stable and needs an FCP.

`@rustbot` label +T-libs-api -T-libs
2023-06-23 19:47:19 -07:00
..
2023-01-19 15:46:08 +00:00
2023-04-27 22:29:04 +02:00
2023-01-27 20:10:17 +00:00
2023-01-27 20:10:17 +00:00
2023-02-09 10:26:49 +00:00
2023-04-27 17:18:11 +00:00
2023-01-12 11:58:24 -08:00
2023-04-27 17:18:11 +00:00
2023-04-27 17:18:11 +00:00
2023-01-27 20:10:17 +00:00
2023-01-27 20:10:17 +00:00
2023-01-27 20:10:17 +00:00
2023-01-27 20:10:17 +00:00
2023-01-27 20:10:17 +00:00
2023-04-27 17:18:11 +00:00
2023-04-27 17:18:11 +00:00
2023-05-24 19:35:59 -03:00
2023-01-30 21:51:35 +00:00
2023-04-27 17:18:11 +00:00
2023-04-27 17:18:12 +00:00
2023-01-19 15:46:08 +00:00
2023-04-03 20:45:02 +02:00
2023-01-27 20:10:17 +00:00
2023-01-27 20:10:17 +00:00