Files
tldr/pages.zh/common/cargo-check.md

24 lines
535 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# cargo check
> 检查本地包及其所有依赖项是否存在错误。
> 更多信息:<https://doc.rust-lang.org/cargo/commands/cargo-check.html>。
- 检查当前包:
`cargo check`
- 检查所有测试:
`cargo check --tests`
- 检查 `tests/integration_test1.rs` 中的集成测试:
`cargo check --test {{integration_test1}}`
- 检查当前包并启用特性 `feature1``feature2`
`cargo check --features {{feature1,feature2}}`
- 检查当前包并禁用默认特性:
`cargo check --no-default-features`