You have two options:
Switch to the nightly toolchain in the terminal globally:
rustup default nightly
After switching the toolchain, don't forget to reload the project model
Or override it using rust-toolchain file in your project.