CARGO-FIX(1) General Commands Manual CARGO-FIX(1) (NAME) cargo-fix - Rust (SYNOPSIS) cargo fix [] (DESCRIPTION) Cargo rustc . rustc ! cargo fix cargo-check(1) . ( ) . : cargo fix cargo check --all-targets . cargo fix cargo check . (features) : cargo fix --features foo cfg --target . cargo fix --target x86_64-pc-windows-gnu cargo fix (issue) . (Edition migration) cargo fix (edition) . : 1. cargo fix --edition . (feature) --all-features . cfg cargo fix --edition --target . 2. Cargo.toml edition . 3. . cargo fix ( --edition) . ! cargo fix cfg . . (OPTIONS) (Fix options) --broken-code . cargo fix . . --edition (edition) . Cargo.toml cargo fix --edition . --edition-idioms . --allow-no-vcs (VCS) . --allow-dirty ( ). --allow-staged . (Package Selection) ( --manifest-path ). (workspace) . workspace.default-members . ( --workspace) . -p spec, --package spec . SPEC cargo-pkgid(1) . * ? [] . Cargo . --workspace . --all --workspace. --exclude SPEC . --workspace . * ? [] . Cargo . (Target Selection) cargo fix ( --all-targets ). (required-features) . . --bin --example --test --bench * ? [] . Cargo . --lib . --bin name . . --bins . --example name (example) . . --examples . --test name . . --tests test = true . (unittest) . lib ( ). test . --bench name . . --benches bench = true . . lib ( ). bench . --all-targets . --lib --bins --tests --benches --examples . (Feature Selection) . default . . -F features, --features features . package-name/feature-name . . --all-features . --no-default-features default . (Compilation Options) --target triple . . . triple --- . : o rustc --print target-list. o "host-tuple" . ( xtask ). o . . build.target . Cargo . (build cache) . -r, --release release . --profile . --profile name . test cfg test . rustc . . --timings . cargo-timing.html target/cargo-timings . . . (Output Options) --target-dir directory . CARGO_TARGET_DIR build.target-dir . target . (Display Options) -v, --verbose . << >> . term.verbose . -q, --quiet cargo. term.quiet . --color when . : o auto (): . o always: . o never: . term.color . --message-format fmt . . : o human (): . short json . o short: . human json . o json: JSON (stdout). . human short . o json-diagnostic-short: rendered JSON <<>> rustc . human short . o json-diagnostic-rendered-ansi: rendered JSON ANSI rustc . human short . o json-render-diagnostics: Cargo rustc JSON Cargo JSON rustc . JSON Cargo rustc . human short . (Manifest Options) --manifest-path path Cargo.toml. Cargo Cargo.toml . --ignore-rust-version rust-version . --locked Cargo.lock . Cargo : o lock . o Cargo lock . (deterministic) CI . --offline Cargo . Cargo . Cargo . . Cargo . cargo-fetch(1) . net.offline . --frozen --locked --offline . (Common Options) +toolchain Cargo rustup cargo + (toolchain) rustup ( +stable +nightly). rustup . --config KEY=VALUE PATH Cargo . TOML KEY=VALUE . . . -C PATH . cargo (Cargo.toml) .cargo/config.toml . cargo -C path/to/my-project build. nightly -Z unstable-options ( #10098 ). -h, --help . -Z flag ( nightly) Cargo. cargo -Z help . (Miscellaneous Options) -j N, --jobs N . build.jobs . . . default . 0 . --keep-going . fails works cargo fix -j1 ( Cargo ) cargo fix -j1 --keep-going . (ENVIRONMENT) Cargo . (EXIT STATUS) o 0: Cargo . o 101: Cargo . (EXAMPLES) 1. : cargo fix 2. (edition) : cargo fix --edition 3. (idioms) : cargo fix --edition-idioms (SEE ALSO) cargo(1), cargo-check(1) CARGO-FIX(1)