Ferris, the Rust mascotRustacean

Home

❯

mocs

❯

Basic Concepts & Syntax

Basic Concepts & Syntax

Jun 21, 20261 min read

  • rust
  • moc
  • basic-concepts
  • syntax

Basic Concepts & Syntax

Basic Concepts & Syntax covers Rust’s first-layer language mechanics: bindings, primitive data, functions, expressions, control flow, and comments.

Concepts

  • Variables and Mutability
  • Shadowing
  • Constants
  • Static Items
  • Scalar Types
  • Boolean Logic
  • Integer Overflow
  • Type Inference
  • Tuples
  • Arrays
  • Functions
  • Generic Functions
  • Name Resolution
  • Statements vs Expressions
  • Control Flow
  • If Expressions
  • Loop Expressions
  • While and For Loops
  • Iterator Method Trio
  • Comments
  • The Display Trait
  • The Debug Trait
  • PartialEq
  • UnsafeCell
  • Build-Time Code Execution
  • Private Fields with Public Constructors
  • Readable Generic APIs

Patterns

  • Documentation Comments

Antipatterns

  • Relying on Integer Overflow

See also

Ownership · Borrowing · Pattern Matching · Slices · Vectors · Result · Testing

Sources

  • The Rust Programming Language, ch. 3 “Common Programming Concepts” — the-book, https://doc.rust-lang.org/book/ch03-00-common-programming-concepts.html
  • The Rust Reference, “Types” — the-reference, https://doc.rust-lang.org/reference/types.html
  • The Rust Reference, “Statements and expressions” — the-reference, https://doc.rust-lang.org/reference/statements-and-expressions.html

Graph View

  • Basic Concepts & Syntax
  • Concepts
  • Patterns
  • Antipatterns
  • See also
  • Sources

Backlinks

  • Rust Brain Home
  • Relying on Integer Overflow
  • Arrays
  • Boolean Logic
  • Build-Time Code Execution
  • Comments
  • Constants
  • Control Flow
  • Functions
  • Generic Functions
  • If Expressions
  • Integer Overflow
  • Iterator Method Trio
  • Loop Expressions
  • Name Resolution
  • PartialEq
  • Private Fields with Public Constructors
  • Readable Generic APIs
  • Scalar Types
  • Shadowing
  • Statements vs Expressions
  • Static Items
  • The Debug Trait
  • The Display Trait
  • Tuples
  • Type Inference
  • UnsafeCell
  • Variables and Mutability
  • While and For Loops
  • index
  • Documentation Comments

Created with Quartz v4.5.2 © 2026

  • GitHub
  • Download (.zip)
  • Latest release