Compilers such as gcc, clang and gccgo all have the switch -fsyntax-only
used in single-buffer syntax checkers such as Flycheck. These only perform syntactic and, I assume, semantic analysis, thereby skipping code generation. Does Rust have something similar?
The cargo check
command instructs cargo
to do just that.
It will check the syntax, types and borrows without generating any code.