← 返回命令列表

Linux command

cargo-report 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Show future incompatibility report

cargo report future-incompatibilities --id [1]

Show report after build

cargo build --future-incompat-report

说明

cargo report generates diagnostic reports about the project. Currently its primary subcommand is `future-incompatibilities`, which displays warnings about code patterns in dependencies that will be rejected in future Rust versions. When Cargo detects future-incompatible warnings during a build, it stores a report and displays a notification with instructions to view the full details. These warnings indicate patterns that may exhibit undefined behavior, are scheduled for removal, or lack well-defined semantics. Reviewing these reports helps maintainers proactively update their dependencies before breaking changes land.

参数

--id _id_
Report ID from previous build
--package _spec_
Package to report on
-v, --verbose
Verbose output
-q, --quiet
Suppress output

FAQ

What is the cargo-report command used for?

cargo report generates diagnostic reports about the project. Currently its primary subcommand is `future-incompatibilities`, which displays warnings about code patterns in dependencies that will be rejected in future Rust versions. When Cargo detects future-incompatible warnings during a build, it stores a report and displays a notification with instructions to view the full details. These warnings indicate patterns that may exhibit undefined behavior, are scheduled for removal, or lack well-defined semantics. Reviewing these reports helps maintainers proactively update their dependencies before breaking changes land.

How do I run a basic cargo-report example?

Run `cargo report future-incompatibilities --id [1]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --id _id_ do in cargo-report?

Report ID from previous build