Apart from the optimizer ruining things, in Rust there's a contract that if your function is marked as safe, it's must be impossible to misuse it for unsafe things even if you give your API to an infinite number of monkeys with keyboards.
Apart from the optimizer ruining things, in Rust there's a contract that if your function is marked as safe, it's must be impossible to misuse it for unsafe things even if you give your API to an infinite number of monkeys with keyboards.