No, Rust does not allow that. The current Rust compiler does, but that’s a bug that is being fixed.
At some point in the future, a fully backwards compatible Rust compiler will report an error when you try to compile cve-rs.
Isn't one of the bugs around ten years old, now? Isn't ten years enough to call something a feature of the language rather than a bug?
I like Rust, but with this bug existing for so long, I personally no longer think of it as memory-safe.
I define undefined behaviour as a bug in C++. Now C++ is memory-safe!
btw, it's not actually that hard to write correct code in C++, easier than in C because you have all the container types. The problem is that nothing will tell you when you write incorrect code - there's no guarantee.
And yet, there's a C compiler (fil-c) that doesn't allow that.
Since we are not at some point in the future where that correct compiler exists and there is only one official compiler, the distinction you make is practically meaningless!