Neither are true, `std:fs::remove_dir_all("/home/user/homework")` will happily compile and run, no matter if that's what you wanted or not.
Rust programs can't know what you want to do, period.
Rust programs can't know what you want to do, period.
https://qouteall.fun/qouteall-blog/2025/How%20to%20Avoid%20F...
Soundness does not cover semantic correctness. Maybe you want to wipe $HOME.
It depends on what you mean by "freed". Can one write a custom allocator in Rust? How does one handle reading from special addresses that represent hardware? In both of these scenarios, one might read from or write to memory that is not obviously allocated.