16 Commits

Author SHA1 Message Date
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
Pavel Grigorenko
c69894eaec New lint: dangling_pointers_from_temporaries 2024-10-28 14:16:05 +03:00
Lukas Markeffsky
8a9f40043f add test for panicking drop in Box/Rc/Arc 2024-10-27 18:32:36 +01:00
mu001999
e7f11b6913 Removes dead code from the compiler 2024-08-25 13:41:39 +08:00
Xiangfei Ding
d495b84a9a
PinCoerceUnsized trait into core 2024-07-31 17:10:55 +08:00
Deadbeef
76dbe29104 rm const traits in libcore 2023-04-16 06:49:27 +00:00
Jubilee Young
e34ad76363 Remove ~const from alloc 2023-03-28 10:37:16 -07:00
Thom Chiovoloni
54a6d4edbc
Add #![deny(unsafe_op_in_unsafe_fn)] in liballoc tests 2022-11-23 08:10:17 -08:00
Oli Scherer
5f7ca55df6 Revert accidental stabilization 2022-03-10 14:36:51 +00:00
woppopo
eb4fc640b0 Constify Box<T, A> methods 2021-12-23 22:03:12 +09:00
Frank Steffahn
a957cefda6 Fix a bunch of typos 2021-12-14 16:40:43 +01:00
est31
8f7007991e Fix grammar 2021-08-24 17:56:39 +02:00
Alexis Bourget
a61b9638bb review: fix nits and move panic safety tests to the correct place 2020-09-25 23:10:24 +02:00
Alexis Bourget
ed52c7bb75 Move deref-lval test 2020-09-21 21:50:26 +02:00
liuzhenyu
3b4151c9f3 fix typos 2020-08-02 23:20:00 +08:00
mark
2c31b45ae8 mv std libs to library/ 2020-07-27 19:51:13 -05:00