The question is. If rust used rust would that have prevented this?
The Rust compiler (rustc) is written in Rust, but there can always be bugs in the compiler, regardless of whether it's written in a memory-safe language or not.
Rust allows for type-proofing your logic, but it can't force you to.
no
Rust does not prevent all bugs, only certain ones (that are common and dangerous).