AFAIK if the project has a rust-toolchain.toml[0] file, cargo will download the correct compiler for the project.
[0] https://rust-lang.github.io/rustup/overrides.html#the-toolch...