[Cargo] error: error parsing override file

I just upgraded to rust 1.49, and ever since then in 1 particular project I get an error completely foreign to me:

$ cargo clean
error: error parsing override file

The same result for cargo build, cargo test etc.

As far as I know I have no explicit "override file" anywhere; I certainly didn't author any.
Can anyone tell me what's going wrong here?

This error means that you have a file name rust-toolchain in the current directory or one of its ancestors, and the file is not in the expected format (a single line with the name of a rustup toolchain, or a TOML file with a specific layout).

It looks like older versions of rustup would ignore anything after the first line of rust-toolchain, but the latest version will throw an error if the file contains multiple lines but is not in TOML format.

That explains it. The second line of the file was an old version of the contents:

# nightly-2018-05-13