diff options
| author | bors <bors@rust-lang.org> | 2024-01-22 18:22:32 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-01-22 18:22:32 +0000 |
| commit | d5fd0997291ca0135401a39dff25c8a9c13b8961 (patch) | |
| tree | 3fd6447ffcb2d9dc5d5aad5fc7c921ae173a5476 /library/alloc/src | |
| parent | 021861aea8de20c76c7411eb8ada7e8235e3d9b5 (diff) | |
| parent | 0b0f0be4198de16f3a23f05e824b3a054dda1355 (diff) | |
| download | rust-d5fd0997291ca0135401a39dff25c8a9c13b8961.tar.gz rust-d5fd0997291ca0135401a39dff25c8a9c13b8961.zip | |
Auto merge of #120242 - matthiaskrgr:rollup-a93yj3i, r=matthiaskrgr
Rollup of 10 pull requests Successful merges: - #117910 (Refactor uses of `objc_msgSend` to no longer have clashing definitions) - #118639 (Undeprecate lint `unstable_features` and make use of it in the compiler) - #119801 (Fix deallocation with wrong allocator in (A)Rc::from_box_in) - #120058 (bootstrap: improvements for compiler builds) - #120059 (Make generic const type mismatches not hide trait impls from the trait solver) - #120097 (Report unreachable subpatterns consistently) - #120137 (Validate AggregateKind types in MIR) - #120164 (`maybe_lint_impl_trait`: separate `is_downgradable` from `is_object_safe`) - #120181 (Allow any `const` expression blocks in `thread_local!`) - #120218 (rustfmt: Check that a token can begin a nonterminal kind before parsing it as a macro arg) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/alloc/src')
| -rw-r--r-- | library/alloc/src/rc.rs | 2 | ||||
| -rw-r--r-- | library/alloc/src/sync.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/library/alloc/src/rc.rs b/library/alloc/src/rc.rs index 263b1449de1..f986df05846 100644 --- a/library/alloc/src/rc.rs +++ b/library/alloc/src/rc.rs @@ -1924,7 +1924,7 @@ impl<T: ?Sized, A: Allocator> Rc<T, A> { // Free the allocation without dropping its contents let (bptr, alloc) = Box::into_raw_with_allocator(src); - let src = Box::from_raw(bptr as *mut mem::ManuallyDrop<T>); + let src = Box::from_raw_in(bptr as *mut mem::ManuallyDrop<T>, alloc.by_ref()); drop(src); Self::from_ptr_in(ptr, alloc) diff --git a/library/alloc/src/sync.rs b/library/alloc/src/sync.rs index 5273b3cb2da..dc82c9c4111 100644 --- a/library/alloc/src/sync.rs +++ b/library/alloc/src/sync.rs @@ -1869,7 +1869,7 @@ impl<T: ?Sized, A: Allocator> Arc<T, A> { // Free the allocation without dropping its contents let (bptr, alloc) = Box::into_raw_with_allocator(src); - let src = Box::from_raw(bptr as *mut mem::ManuallyDrop<T>); + let src = Box::from_raw_in(bptr as *mut mem::ManuallyDrop<T>, alloc.by_ref()); drop(src); Self::from_ptr_in(ptr, alloc) |
