Async functions in sub-crate break formatting #13790
Labels
A-formatting
formatting of r-a output/formatting on save
C-bug
Category: bug
S-actionable
Someone could pick this issue up and work on it right now
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. Runningcargo fmt
always works even when rust-analyzer fails to formatI 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.
The text was updated successfully, but these errors were encountered: