Nightly rust can be a crap shoot, especially lately. First they changed the name of rls from rls to rls-preview, and then they decided they'd break the build half the time... Oh well! It's just nightly.

However, if you're writing code against nightly on a regular basis, this can be pretty annoying—in particular because it means that, in a lot of cases, you don't have code completion in your pseudo-ide. Here's a quick fix to avoid that problem in the future. You know, once (hopefully) the build works again. Hat tip to Xanewok, who posted this script on #641.

(I checked the build status. Should be good tomorrow, I swear.)

#!/usr/bin/env bash
# Update rust nightly as long as rls is included
if curl https://static.rust-lang.org/dist/channel-rust-nightly.toml 2>/dev/null | grep -q 'rls-preview'
then
  rustup update nightly
else
  echo 'latest nightly is missing rls' >&2
  exit 1
fi

The idea here is that toml file should list everything available in the current nightly, and the update should execute only if grep can find a mention of rls-preview. If you want to get fancy, maybe you can swap grep for rg? I dunno.

Anyway, happy hacking.