Open
Description
I recently started a new project using Rust's async
/await
feature, with some code like this:
async fn body() {
let releases: github::Releases =
reqwest::get("https://api.github.com/repos/foo/bar/releases")
.await?
.json()?;
}
When trying to save my buffer, the RustFmt plugin throws an error and fails to reformat the file because these features are not available in Rust 2015 Edition:
The same error can be found by running rustfmt foo.rs
directly.
When run on a 2018 edition project, the --edition 2018
argument should be passed to rustfmt. This matches the behavior of cargo fmt
.
Metadata
Metadata
Assignees
Labels
No labels