rust/library/alloc/src
bors e473783d90 Auto merge of #132231 - lukas-code:rc-plug-leaks, r=tgross35
Rc/Arc: don't leak the allocation if drop panics

Currently, when the last `Rc<T>` or `Arc<T>` is dropped and the destructor of `T` panics, the allocation will be leaked. This leak is unnecessary since the data cannot be (safely) accessed again and `Box` already deallocates in this case, so let's do the same for `Rc` and `Arc`, too.
2024-10-29 16:26:00 +00:00
..
alloc Reformat use declarations. 2024-07-29 08:26:52 +10:00
boxed Split boxed.rs into a few modules 2024-10-28 12:29:19 -07:00
collections library: consistently use American spelling for 'behavior' 2024-10-25 12:02:47 +02:00
ffi Rollup merge of #130608 - YohDeadfall:cstr-from-into-str, r=workingjubilee 2024-10-15 05:12:34 +02:00
raw_vec Polymorphize RawVec 2024-08-09 20:06:26 -04:00
rc Add str.as_str() for easy dereferencing of Box<str> 2024-09-19 16:25:56 +01:00
sync Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
testing Reformat use declarations. 2024-07-29 08:26:52 +10:00
vec library: consistently use American spelling for 'behavior' 2024-10-25 12:02:47 +02:00
alloc.rs read_volatile __rust_no_alloc_shim_is_unstable in alloc_zeroed 2024-09-17 22:26:21 -04:00
borrow.rs remove const_cow_is_borrowed feature gate 2024-10-12 19:48:28 +02:00
boxed.rs Split boxed.rs into a few modules 2024-10-28 12:29:19 -07:00
fmt.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
lib.miri.rs add 'x.py miri', and make it work for 'library/{core,alloc,std}' 2024-04-03 20:27:20 +02:00
lib.rs Rename Receiver -> LegacyReceiver 2024-10-22 12:55:16 +00:00
macros.rs Mark format! with must_use hint 2024-07-06 14:24:20 +02:00
raw_vec.rs Re-do recursive const stability checks 2024-10-25 20:31:40 +02:00
rc.rs Rc destructor: tweak inlining 2024-10-28 22:59:14 +01:00
slice.rs Port sort-research-rs test suite Rust stdlib tests 2024-09-30 15:05:30 +02:00
str.rs better default capacity for str::replace 2024-10-22 19:53:33 +03:00
string.rs Auto merge of #130223 - LaihoE:faster_str_replace, r=thomcc 2024-10-17 16:20:02 +00:00
sync.rs Rc/Arc: don't leak the allocation if drop panics 2024-10-27 18:32:36 +01:00
task.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
tests.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00