UPDATE: i fixed by accident. this is what i did, i opened a terminal outside the workspace and uninstalled and reinstalled both the nightly and stable versions. but then cargo stopped working, like the command wasn't installed, but rustc worked and gave the correct version when i switched toolchains. then i exited and reopened the terminal and cargo was working.
I was using the nightly (1.71.0) version for
cargo. but then to test something out i switched the default toolchain to stable. I've since changed the default toolchain back to nightly, but
cargo --version is still stable 1.69.0
Even if I have a
rust-toolchain.toml in the workspace root, cargo is still 1.69
I've tried reinstalling the toolchains, doing
rustup update, checked the defaults and overrides, and I couldn't figure it out
I'm having to compile my project with
rustup run nightly cargo build
What am I doing wrong?