Introduction
1.
Notation
2.
Lexical structure
2.1.
Input format
2.2.
Keywords
2.3.
Identifiers
2.4.
Comments
2.5.
Whitespace
2.6.
Tokens
2.7.
Paths
3.
Macros
3.1.
Macros By Example
3.2.
Procedural Macros
4.
Crates and source files
5.
Items and attributes
5.1.
Items
5.1.1.
Modules
5.1.2.
Extern crates
5.1.3.
Use declarations
5.1.4.
Functions
5.1.5.
Type aliases
5.1.6.
Structs
5.1.7.
Enumerations
5.1.8.
Unions
5.1.9.
Constant items
5.1.10.
Static items
5.1.11.
Traits
5.1.12.
Implementations
5.1.13.
External blocks
5.2.
Visibility and Privacy
5.3.
Attributes
6.
Statements and expressions
6.1.
Statements
6.2.
Expressions
6.2.1.
Literal expressions
6.2.2.
Path expressions
6.2.3.
Block expressions
6.2.4.
Operator expressions
6.2.5.
Array and index expressions
6.2.6.
Tuple and index expressions
6.2.7.
Struct expressions
6.2.8.
Enum variant expressions
6.2.9.
Call expressions
6.2.10.
Method call expressions
6.2.11.
Field access expressions
6.2.12.
Closure expressions
6.2.13.
Loop expressions
6.2.14.
Range expressions
6.2.15.
If and if let expressions
6.2.16.
Match expressions
6.2.17.
Return expressions
7.
Type system
7.1.
Types
7.2.
Dynamically Sized Types
7.3.
Type layout
7.4.
Interior mutability
7.5.
Subtyping
7.6.
Type coercions
7.7.
Destructors
8.
Special types and traits
9.
Memory model
9.1.
Memory allocation and lifetime
9.2.
Memory ownership
9.3.
Variables
10.
Linkage
11.
Unsafety
11.1.
Unsafe functions
11.2.
Unsafe blocks
11.3.
Behavior considered undefined
11.4.
Behavior not considered unsafe
Appendix: Influences
Appendix: As-yet-undocumented Features
Appendix: Glossary
The Rust Reference
Type system