format code fail, if there is an async function
wugifer opened this issue · 5 comments
wugifer commented
I wrote this:
fn test() {
let a=1;
}
after formatted, I got this:
fn test() {
let a = 1;
}
that is ok.
but when I wrote this:
async fn test() {
let a=1;
}
fn test2 (){}
after formatted, nothing happen.
version: rust-analyzer v0.3.1301
wugifer commented
rustup 1.24.3 (ce5817a94 2021-05-31)
wugifer commented
rustfmt 1.4.38-stable (db9d1b20 2022-01-20)
wugifer commented
Cargo.toml:
[package]
edition = "2021"
wugifer commented
add edition = "2018" in rustfmt.toml, done
Aloso commented
Please report issues in rust-lang/rust-analyzer in the future. This repo is only for the rust-analyzer website, https://rust-analyzer.github.io/.