Switch the default toolchain to nightly so that the cargo and rustc commands will use it

rustup

  • Rust toolchain installer.
    Install, manage, and update Rust toolchains.
    More information: <https://github.com/rust-lang/rustup.rs>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

rustup default nightly

click the source code to copy install rustup on any operating system with command-not-found.com