Hy I’m new to Rust and currently working through the “Book” but there’s something with Cargo that’s a little bit annoying. Sometimes, when I make a new project and run it the first time with
cargo run, everything’s fine but when I make a small change to the code after that and run it again I get an error:
error: failed to link or copy
Access is denied. (os error 5)
The .exe file under \debug disappears and I’m also not able to for example delete the folder even as admin. A restart solves the problem with the permission but it’s still annoying to be forced to create the project again, copy and paste the code and so on.
cargo build instead of
run had no effect. I’m using Windows 10. Maybe someone of you had a similar issue and could help me understand what causes the problem.