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
$ cargo fmt
Failed to find targets
cargo-fmt 1.4.18
This utility formats all bin and lib files of the current crate using rustfmt.
USAGE:
cargo fmt [FLAGS] [OPTIONS] [-- <rustfmt-options>...]
FLAGS:
--all Format all packages (only usable in workspaces)
-q, --quiet No output printed to stdout
-v, --verbose Use verbose output
--version Print rustfmt version and exit
OPTIONS:
--manifest-path <manifest-path> Specify path to Cargo.toml
--message-format <message-format> Specify message-format: short|json|human
-p, --package <package>... Specify package to format (only usable in workspaces)
ARGS:
<rustfmt-options>... Options passed to rustfmt
Problem
Steps
cargo new outer && cd outer
cargo new inner
printf '[workspace]\nmembers = ["inner"]' >> Cargo.toml
cd src
cargo fmt
Possible Solution(s)
cargo fmt
should format all packages in the workspace, like it does from the top-level directory.Notes
Output of
cargo version
:cargo 1.48.0-nightly (875e01232 2020-09-08)
(but the problem also occurs on 1.46 stable)The text was updated successfully, but these errors were encountered: