Description
rust-analyzer version: 21e61be 2022-12-10
rustc version: rustc 1.66.0 (69f9c33d7 2022-12-12)
relevant settings: helix editor with default settings
When working with a project composed of multiple local crates added via lib = { path = "./lib" }
in cargo.toml formatting seems to fail if an async function or an async block is present in the current file. This seems to affect the entire file where async code is present. Running formatting on the topmost crate even when multiple crates are in cargo.toml causes formatting to run correctly. Running cargo fmt
always works even when rust-analyzer fails to format
I created a minimal reproduction here https://github.com/fmeef/rust-analyzer-format-fail/, attempting to format the lib.rs file in the lib crate results in nothing actually happening.