Output modes#
A full matrix run can print a lot. These flags control how much you see. They are CLI flags, but most can also be set as defaults in Cargo.toml.
--diagnostics-only#
Show only warnings and errors per combination, suppressing build progress and “Finished” chatter.
cargo fc --diagnostics-only clippy$ cargo fc --diagnostics-only clippy --workspace Linting [1/4] loader ( features = [] ) warning: function `checksum` is never used --> crates/loader/src/lib.rs:12:4 | 12 | fn checksum(bytes: &[u8]) -> usize { | ^^^^^^^^ | = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default Linting [2/4] loader ( features = [experimental] ) error[E0425]: cannot find function `missing_helper` in this scope --> crates/loader/src/lib.rs:32:5 | 32 | missing_helper() | ^^^^^^^^^^^^^^ not found in this scope For more information about this error, try `rustc --explain E0425`. Linting [3/4] loader ( features = [experimental, validation] ) error[E0425]: cannot find function `missing_helper` in this scope --> crates/loader/src/lib.rs:32:5 | 32 | missing_helper() | ^^^^^^^^^^^^^^ not found in this scope For more information about this error, try `rustc --explain E0425`. Linting [4/4] loader ( features = [validation] ) warning: function `checksum` is never used --> crates/loader/src/lib.rs:12:4 | 12 | fn checksum(bytes: &[u8]) -> usize { | ^^^^^^^^ | = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default Finished 4 feature combinations for 1 package in 0.00s WARN loader ( 0 errors, 1 warnings, features = [] ) FAIL loader ( 1 errors, 0 warnings, features = [experimental] ) FAIL loader ( 1 errors, 0 warnings, features = [experimental, validation] ) WARN loader ( 0 errors, 1 warnings, features = [validation] )
Cargo’s own warnings, such as the manifest lints cargo::redundant_homepage and cargo::unused_workspace_dependencies, are shown and counted too.
The command must accept --message-format and emit rustc JSON diagnostics. That is true for build, check, clippy, and doc — and any alias or wrapper that does the same. It is not safe for test or run, which is why broad diagnostics defaults don’t apply to them automatically.
A --message-format you pass to the command wins over --diagnostics-only. With a JSON format other than json-render-diagnostics, Cargo prints compiler warnings as JSON on stdout. For build and check, cargo-fc relays that stdout unchanged, even under --summary-only, and counts the warnings in it. Other commands keep stdout to themselves, so the warnings they print as JSON are not counted: test and run print program output there, and an alias may shadow short forms such as c and external subcommands such as clippy. For build-only commands such as clippy, use --diagnostics-only to count their warnings instead.
--dedupe#
Like --diagnostics-only, but also collapses identical diagnostics that repeat across combinations, so a warning present in twenty combinations is shown once.
cargo fc --dedupe clippy$ cargo fc --dedupe clippy --workspace Linting [1/4] loader ( features = [] ) warning: function `checksum` is never used --> crates/loader/src/lib.rs:12:4 | 12 | fn checksum(bytes: &[u8]) -> usize { | ^^^^^^^^ | = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default Linting [2/4] loader ( features = [experimental] ) error[E0425]: cannot find function `missing_helper` in this scope --> crates/loader/src/lib.rs:32:5 | 32 | missing_helper() | ^^^^^^^^^^^^^^ not found in this scope For more information about this error, try `rustc --explain E0425`. Linting [3/4] loader ( features = [experimental, validation] ) Note 2 duplicate diagnostics suppressed Linting [4/4] loader ( features = [validation] ) Note 1 duplicate diagnostic suppressed Finished 4 feature combinations for 1 package in 0.00s WARN loader ( 0 errors, 1 warnings, 0 suppressed, features = [] ) FAIL loader ( 1 errors, 0 warnings, 0 suppressed, features = [experimental] ) FAIL loader ( 1 errors, 0 warnings, 2 suppressed, features = [experimental, validation] ) WARN loader ( 0 errors, 1 warnings, 1 suppressed, features = [validation] )
--dedupe implies --diagnostics-only.
A diagnostic counts as shown once a deduplicated combination prints it. Under --summary-only, a combination’s diagnostics are printed only when it fails without a compiler error, or when it stops --fail-fast, so a hidden copy never suppresses the one that explains a later failure, and the suppressed column counts repeats of diagnostics actually shown.
--summary-only#
Hide cargo output entirely and print only the final per-combination result table.
cargo fc --summary-only check$ cargo fc --summary-only check --workspace Checking [1/4] loader ( features = [] ) Checking [2/4] loader ( features = [experimental] ) Checking [3/4] loader ( features = [experimental, validation] ) Checking [4/4] loader ( features = [validation] ) Finished 4 feature combinations for 1 package in 0.00s WARN loader ( 0 errors, 1 warnings, features = [] ) FAIL loader ( 1 errors, 0 warnings, features = [experimental] ) FAIL loader ( 1 errors, 0 warnings, features = [experimental, validation] ) WARN loader ( 0 errors, 1 warnings, features = [validation] )
--fail-fast#
Stop at the first combination that fails instead of running the whole matrix. Useful locally when you just want the first problem.
cargo fc --fail-fast test--pedantic#
Treat warnings as failures in the summary and under --fail-fast. A combination with warnings but no errors is then reported as failing.
Warnings count whether rustc or Cargo itself reports them. Cargo’s own warnings, such as manifest lints, count when Cargo summarizes them with a generated N warnings line; ones it prints without such a line, such as a build script’s cargo::warning, do not.
cargo fc --pedantic --fail-fast clippy--errors-only#
Allow all warnings and surface errors only (equivalent to -A warnings). This appends to the effective child RUSTFLAGS / CARGO_ENCODED_RUSTFLAGS, including values from cargo-fc env config. Like any RUSTFLAGS environment override, the result shadows rustflags set in Cargo config files.
cargo fc --errors-only checkPruning: --show-pruned and --prune-implied#
cargo fc prunes redundant feature combinations by default (you never need to enable this). --show-pruned includes them in the summary marked SKIP; --prune-implied=false disables pruning for the run:
cargo fc --show-pruned check
cargo fc --prune-implied=false checkSee Automatic pruning for what it does and a worked example.
Combining flags#
Flags compose. A common local loop:
# Fast feedback: first failure only, warnings-as-errors, deduped diagnostics
cargo fc --dedupe --pedantic --fail-fast clippyFor the exhaustive list, see the CLI reference.