That’s what I meant. An arena-allocated Rc (this is not a full “free at once” arena, but rather an “compartment arena” where data can be free-ed while the arena is being used) can’t call destructors for leaked contents of the arena when the arena exits because destroying a reference cycle would be unsound, so reference cycles are still leaked. However, the memory owned by the arena could still be free-ed.
This is basically a by-design use of allocators, and therefore is unlikely to be removed.
may_dangle seems so little understood, I don’t even know one precise definition of it – let alone two (a lower and an upper bound).
From my POV (see e.g. https://github.com/rust-lang/rfcs/pull/1327#issuecomment-149366279 and the newer https://github.com/nikomatsakis/nll-rfc/blob/30db8883d63b102bf8544e425a21f0d3ebe27ab3/0000-nonlexical-lifetimes.md#layer-3-accomodating-dropck), the main problem with may_dangle is that it basically makes calling functions unsafe.
The semantics are pretty clear - it removes the implicit assumption that type and lifetime parameters are active when they are in scope, and also the similar WF assumption that &'a mut T requires that T: 'a. That’s a problem for safety, because any function based on that type parameter assumes that these lifetimes are in scope, which means calling it is illegal - so you basically have to prove that your destructor is safe “from first principles”, as if the lifetime system did not exist.
I’ll note that in a destructor impl, there’s still the “data-type is destruction safe” bound - the compiler guarantees that the fields of your type are destruction-safe, which means you can safely call destructors on the types of subfields (and that ends up calling a Drop impl, then you know the lifetime obligations for that impl are met, and you’re back in the “modular world” again).
There’s just no compiler infrastructure for proving that sort of thing, as that would basically require duplicating the type-checker, so you’re on your own when it comes to the proofs.
The “josephine invariant” (https://github.com/rust-lang/rust/issues/34761#issuecomment-362855806) was never intended to hold - in fact, as I demonstrated, planned-to-be-implemented allocator support would break it.