mirror of
https://github.com/google/comprehensive-rust.git
synced 2024-12-17 15:21:32 +02:00
341 B
341 B
Basic Syntax
Much of the Rust syntax will be familiar to you from C, C++ or Java:
- Blocks and scopes are delimited by curly braces.
- Line comments are started with
//
, block comments are delimited by/* ... */
. - Keywords like
if
andwhile
work the same. - Variable assignment is done with
=
, comparison is done with==
.