You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a workspace has bin and lib packages, specifying a manifest path in the invocation of cargo fmt makes cargo fmt fail to find targets.
$ cargo fmt --check --manifest-path Cargo.toml
Failed to find targets
This utility formats all bin and lib files of the current crate using rustfmt.
...
Describe the bug
When a workspace has bin and lib packages, specifying a manifest path in the invocation of
cargo fmt
makescargo fmt
fail to find targets.To Reproduce
mkdir workspace_dir && cd workspace_dir
printf '[workspace]\nmembers = ["inner_bin", "inner_lib"]' >> Cargo.toml
cargo new inner_bin
cargo new inner_lib --lib
cargo fmt --check --manifest-path Cargo.toml
Expected behavior
cargo fmt should check formatting in all packages in the workspace.
Meta
rustfmt version: 1.8.0
From where did you install rustfmt?: msrustup
How do you run rustfmt:
cargo fmt --check --manifest-path Cargo.toml
The text was updated successfully, but these errors were encountered: