Having a .rust-toolchain file and the edition in Cargo.toml should achieve this - and both of these should be done anyway!