I mean, it's called Box::leak(). It says what it does on the tin. Why was my file descriptor leaked? Oh, I specifically leaked it. As to third party libraries, well, it's a quality of implementation issue. The third party library might forget to flush caches, muddle up file formats, or just crash.
This use of clear naming is one of the things I value in the Rust standard library. Both Rust and C++ provide both a stable sort, and also an unstable sort which may be faster if you know that's suitable. But Rust calls its unstable sort unstable_sort() and so if you don't even know what the difference is you're going to pick "sort" and get no surprises. In C++ "sort" is the unstable sort and if you didn't already know about sort stability then I guess you'll find out the hard way, sucks to be you.
You'll find absolutely no argument from me about these things -- when Rust can't guarantee a particular thing (and there are many, many things it reasonably can't and won't guarantee!), it does an excellent job of its APIs descriptive.
The sole point was one of formal guarantees: this post is about bugs the compiler catches, and the first example is one that Rust will not catch. It won't catch it because, in many cases, it's not a bug at all!
This use of clear naming is one of the things I value in the Rust standard library. Both Rust and C++ provide both a stable sort, and also an unstable sort which may be faster if you know that's suitable. But Rust calls its unstable sort unstable_sort() and so if you don't even know what the difference is you're going to pick "sort" and get no surprises. In C++ "sort" is the unstable sort and if you didn't already know about sort stability then I guess you'll find out the hard way, sucks to be you.