The Rust Reference
Introduction
Notation
Lexical structure
Input format
Keywords
Identifiers
Comments
Whitespace
Tokens
Macros
Macros By Example
Procedural Macros
Crates and source files
Conditional compilation
Items
Modules
Extern crates
Use declarations
Functions
Type aliases
Structs
Enumerations
Unions
Constant items
Static items
Traits
Implementations
External blocks
Generic parameters
Associated Items
Attributes
Testing
Derive
Diagnostics
Code generation
Limits
Type System
Debugger
Statements and expressions
Statements
Expressions
Literal expressions
Path expressions
Block expressions
Operator expressions
Grouped expressions
Array and index expressions
Tuple and index expressions
Struct expressions
Call expressions
Method call expressions
Field access expressions
Closure expressions
Loop expressions
Range expressions
If expressions
Match expressions
Return expressions
Await expressions
Underscore expressions
Patterns
Type system
Types
Boolean type
Numeric types
Textual types
Never type
Tuple types
Array types
Slice types
Struct types
Enumerated types
Union types
Function item types
Closure types
Pointer types
Function pointer types
Trait object types
Impl trait type
Type parameters
Inferred type
Dynamically Sized Types
Type layout
Interior mutability
Subtyping and Variance
Trait and lifetime bounds
Type coercions
Destructors
Lifetime elision
Special types and traits
Names
Namespaces
Scopes
Preludes
Paths
Name resolution
Visibility and privacy
Memory model
Memory allocation and lifetime
Variables
Panic
Linkage
Inline assembly
Unsafety
The `unsafe` keyword
Behavior considered undefined
Behavior not considered unsafe
Constant Evaluation
Application Binary Interface
The Rust runtime
Appendices
Grammar summary
Macro Follow-Set Ambiguity Formal Specification
Influences
Test summary
Glossary
Type system
Previous
Next