You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-07-13 17:44:20 +02:00
10 lines
334 B
Markdown
10 lines
334 B
Markdown
![]() |
# Basic Syntax
|
||
|
|
||
|
Much of the Rust syntax will be familiar to you from C or C++:
|
||
|
|
||
|
* Blocks and scopes are delimited by curly braces.
|
||
|
* Line comments are started with `//`, block comments are delimited by `/* ...
|
||
|
*/`.
|
||
|
* Keywords like `if` and `while` work the same.
|
||
|
* Variable assigment is done with `=`, comparison is done with `==`.
|