From here.
Make sure you run Rust 1.31.0 (or later) and that you have edition = "2018" set in the [package] section of your Cargo.toml file.