What is the `rustc` equivalent of `cargo check`

I'm investigating a lot of ICEs on github and I wonder that sometimes a ICE needs cargo build to happen, instead of cargo check.

According to cargo --help:

    check, c    Analyze the current package and report errors, but don't build object files

That's what I typically want (because its faster :wink: )

But what are the equivalent rustc command line arguments? I can't find a "check only" mode in the man page.

That is rustc --emit metadata. This will create .rmeta files instead of .rlib files.

3 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.