Reputation: 12138
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?
Upvotes: 2
Views: 331
Reputation: 300149
The cargo check
command instructs cargo
to do just that.
It will check the syntax, types and borrows without generating any code.
Upvotes: 6