rust/library/alloc/src
Guillaume Boisseau b0ca9b5d44
Rollup merge of #121622 - dtolnay:wake, r=cuviper
Preserve same vtable pointer when cloning raw waker, to fix Waker::will_wake

Fixes #121600.

As `@jkarneges` identified in https://github.com/rust-lang/rust/issues/121600#issuecomment-1963041051, the issue is two different const promotions produce two statics at different addresses, which may or may not later be deduplicated by the linker (in this case not).

Prior to #119863, the content of the statics was compared, and they were equal. After, the address of the statics are compared and they are not equal.

It is documented that `will_wake` _"works on a best-effort basis, and may return false even when the Wakers would awaken the same task"_ so this PR fixes a quality-of-implementation issue, not a correctness issue.
2024-03-02 20:13:22 +01:00
..
alloc run alloc benchmarks in Miri and fix UB 2022-11-07 10:34:04 +01:00
boxed library: use addr_of! 2024-02-24 16:02:17 +03:00
collections remove hidden use of Global 2024-03-01 11:51:28 +00:00
ffi Use generic NonZero everywhere in alloc. 2024-02-22 15:17:34 +01:00
raw_vec add more niches to rawvec 2023-12-11 23:38:48 +01:00
rc remove redundant imports 2023-12-10 10:56:22 +08:00
slice ignore core, alloc and test tests that require unwinding on panic=abort 2023-06-13 15:53:24 +02:00
sync Fix some Arc allocator leaks 2024-01-28 18:33:34 +01:00
testing Share testing utilities with non-btree test cases 2022-05-02 10:07:50 +02:00
vec Document args returned from Vec::into_raw_parts{,_with_alloc} 2024-02-26 19:32:32 +00:00
alloc.rs libs: use assert_unchecked instead of intrinsic 2024-01-13 20:10:00 +01:00
borrow.rs Add more diagnostic items for clippy 2023-10-05 18:21:47 -04:00
boxed.rs Auto merge of #118634 - Jules-Bertholet:box-allocator-static, r=Amanieu 2024-02-22 02:03:29 +00:00
fmt.rs docs: use correct link, use secondary example 2024-02-12 20:17:47 -05:00
lib.rs have String use SliceIndex impls from str 2024-02-27 09:41:32 -07:00
macros.rs Update doc for alloc::format! and core::concat! 2023-09-06 15:11:21 +02:00
raw_vec.rs Remove unnecessary unit binding 2024-02-17 16:20:09 +08:00
rc.rs library: use addr_of! 2024-02-24 16:02:17 +03:00
slice.rs Bump version placeholders 2024-02-08 07:43:38 -05:00
str.rs Export core::str::from_raw_parts{,_mut} into alloc::str and std::str 2024-01-25 18:11:54 -08:00
string.rs Rollup merge of #120291 - pitaj:string-sliceindex, r=Amanieu 2024-02-29 05:25:26 -05:00
sync.rs library: use addr_of! 2024-02-24 16:02:17 +03:00
task.rs Generate original vtable and clone's vtable in the same CGU 2024-02-26 20:56:44 -08:00
tests.rs remove redundant imports 2023-12-10 10:56:22 +08:00