BTreeMap: revert a part of #78015 and test what it broke#78397
BTreeMap: revert a part of #78015 and test what it broke#78397ssomers wants to merge 1 commit intorust-lang:masterfrom ssomers:btree_revert_78015
Conversation
|
This has nothing to do with the tree's MaybeUninits. After #78015, I'm more sure that this isn't a problem for the use of |
|
Can you clarify exactly what leaks and where? I'm not sure I'm quite following -- it might be a bug with drop elaboration or something like that if I am, in which case we shouldn't fix it here. |
|
The symptom I ran into is that in the new test case, without rolling back the use of It baffles me. I'm about to fire a question about playground, When a panic occurs dropping an element of a container, Rust still tries to drop the other elements. Same for a tuple, as shown in the example. But apparently not for function arguments? |
|
The playground code looks like an instance of bug #47949. |
|
@tmiasko Thanks, yes indeed, that seems to be the culprit. It's the return value that is forgotten, not the arguments, as more purposefully demonstrated in this example. I'll keep the test case for a future PR then. |
Just after waiting for #78015 to make it through, I figured out it can cause a leak if a drop panics, and I don't know how to fix it, other than to revert that part.
r? @Mark-Simulacrum