Forum Discussion
HELP, cargo run FORGETS how to build on win11 restart
so, i'm a supernoob with rust, and i am learning from a guide i found on youtube that follows the official book. so please forgive me if this is a stupid question (this feels infuriatingly stupid.)
`cargo run` *builds and runs* the program that i coded. but when i restart windows11, `cargo run` just *forgets* how to build, and runs with the old code. (see image 1)
it doesn't run the "main.exe" as i expected, as i deleted it, and it just gives me the same old results.
going directly into /src and running `cargo build` doesn't work either.
i tested this after making a new project with `cargo init`, copypasting my own code, and running `cargo run` inside the new directory, and it works just fine. so i reset my PC, and the same thing happens. test confirmed. cargo just forgets how to build when i run the `cargo run` command.
magically, strangely, the second project just began working again, and idek what i did to fix it aside from taking a screenshot. (can't post image 2 i guess)
am i going insane? is my rust installation broken? why can't `cargo run` build after a PC restart? is windows playing with me? i feel like rust is pointing at me and laughing at this point, with how it just stops working, and then starts working again when it wants.