If you don't use `unsafe` then it guarantees it barring compiler mistakes. The compiler has had issues with memory safety before, they were found, and they were fixed. There might be some left lurking, but they are extremely unlikely since people are using it in production and haven't seen anything weird.
If you use `unsafe` you have to make sure of it yourself, but you can easily grep for this keyword and see where the monsters lurk.