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.
They certainly know that you dont want to process garbage data from freed memory.
Soundness does not cover semantic correctness. Maybe you want to wipe $HOME.
"If it compiles, then only logical bugs will make it eat your homework"
The better phrase is that "if it compiles, then many possible Heisenbugs vanish"
https://qouteall.fun/qouteall-blog/2025/How%20to%20Avoid%20F...