"guarantee no leaks whatsoever" isn't really possible because "leak" isn't a precise term. It depends on the _intention_ of the programmer. Shoving things in a global hashmap is desired in many cases.
FWIW it was possible to extend Rust's types with a ?Leak marker that can protect against scoped data being leaked, but that solution was not chosen.
FWIW it was possible to extend Rust's types with a ?Leak marker that can protect against scoped data being leaked, but that solution was not chosen.