cargo fix
Automatically fix lint warnings reported by rustc
Options
Name | Description |
---|---|
-p, --package <package...> |
|
--exclude <exclude> |
|
-j, --jobs <jobs> | Number of parallel jobs, defaults to # of CPUs |
--bin <bin...> |
|
--example <example...> |
|
--test <test...> |
|
--bench <bench...> |
|
--profile <profile> | Build artifacts with the specified profile |
--features <features...> |
|
--target <target> |
|
--target-dir <target-dir> | Directory for all generated artifacts |
--manifest-path <manifest-path> | Path to Cargo.toml |
--message-format <message-format> |
|
--color <color> | Coloring: auto, always, never |
--config <config> |
|
-Z <unstable-features> |
|
-q, --quiet | Do not print cargo log messages |
--workspace | Fix all packages in the workspace |
--all | Alias for --workspace (deprecated) |
--lib | Fix only this package's library |
--bins | Fix all binaries |
--examples | Fix all examples |
--tests | Fix all tests |
--benches | Fix all benches |
--all-targets | Fix all targets (default) |
-r, --release | Fix artifacts in release mode, with optimizations |
--all-features | Activate all available features |
--no-default-features | Do not activate the `default` feature |
--broken-code | Fix code even if it already has compiler errors |
--edition | Fix in preparation for the next edition |
--edition-idioms | Fix warnings to migrate to the idioms of an edition |
--allow-no-vcs | Fix code even if a VCS was not detected |
--allow-dirty | Fix code even if the working directory is dirty |
--allow-staged | Fix code even if the working directory has staged changes |
--ignore-rust-version | Ignore `rust-version` specification in packages |
-h, --help | Print help information |
-v, --verbose |
|
--frozen | Require Cargo.lock and cache are up to date |
--locked | Require Cargo.lock is up to date |
--offline | Run without accessing the network |
--timings | Timing output formats (unstable) |