@@ -10,62 +10,62 @@ directory, so all fixes need to be made in `/src/`.
1010
1111The following lists contain keywords that are reserved for current or future
1212use by the Rust language. As such, they cannot be used as identifiers (except
13- as raw identifiers, as we’ll discuss in “Raw Identifiers” on page XX).
14- * Identifiers* are names of functions, variables, parameters, struct fields,
15- modules, crates, constants, macros, static values, attributes, types, traits ,
16- or lifetimes.
13+ as raw identifiers, as we discuss in the “Raw
14+ Identifiers” section). * Identifiers* are names
15+ of functions, variables, parameters, struct fields, modules, crates, constants ,
16+ macros, static values, attributes, types, traits, or lifetimes.
1717
18- ## Keywords Currently in Use
18+ ### Keywords Currently in Use
1919
2020The following is a list of keywords currently in use, with their functionality
2121described.
2222
23- * ** ` as ` ** : perform primitive casting, disambiguate the specific trait
24- containing an item, or rename items in ` use ` statements
25- * ** ` async ` ** : return a ` Future ` instead of blocking the current thread
26- * ** ` await ` ** : suspend execution until the result of a ` Future ` is ready
27- * ** ` break ` ** : exit a loop immediately
28- * ** ` const ` ** : define constant items or constant raw pointers
29- * ** ` continue ` ** : continue to the next loop iteration
30- * ** ` crate ` ** : in a module path, refers to the crate root
31- * ** ` dyn ` ** : dynamic dispatch to a trait object
32- * ** ` else ` ** : fallback for ` if ` and ` if let ` control flow constructs
33- * ** ` enum ` ** : define an enumeration
34- * ** ` extern ` ** : link an external function or variable
35- * ** ` false ` ** : Boolean false literal
36- * ** ` fn ` ** : define a function or the function pointer type
37- * ** ` for ` ** : loop over items from an iterator, implement a trait, or specify a
38- higher- ranked lifetime
39- * ** ` if ` ** : branch based on the result of a conditional expression
40- * ** ` impl ` ** : implement inherent or trait functionality
41- * ** ` in ` ** : part of ` for ` loop syntax
42- * ** ` let ` ** : bind a variable
43- * ** ` loop ` ** : loop unconditionally
44- * ** ` match ` ** : match a value to patterns
45- * ** ` mod ` ** : define a module
46- * ** ` move ` ** : make a closure take ownership of all its captures
47- * ** ` mut ` ** : denote mutability in references, raw pointers, or pattern bindings
48- * ** ` pub ` ** : denote public visibility in struct fields, ` impl ` blocks, or
49- modules
50- * ** ` ref ` ** : bind by reference
51- * ** ` return ` ** : return from function
52- * ** ` Self ` ** : a type alias for the type we are defining or implementing
53- * ** ` self ` ** : method subject or current module
54- * ** ` static ` ** : global variable or lifetime lasting the entire program
55- execution
56- * ** ` struct ` ** : define a structure
57- * ** ` super ` ** : parent module of the current module
58- * ** ` trait ` ** : define a trait
59- * ** ` true ` ** : Boolean true literal
60- * ** ` type ` ** : define a type alias or associated type
61- * ** ` union ` ** : define a union; is a keyword only when used in a union
62- declaration
63- * ** ` unsafe ` ** : denote unsafe code, functions, traits, or implementations
64- * ** ` use ` ** : bring symbols into scope
65- * ** ` where ` ** : denote clauses that constrain a type
66- * ** ` while ` ** : loop conditionally based on the result of an expression
67-
68- ## Keywords Reserved for Future Use
23+ * ** ` as ` ** : Perform primitive casting, disambiguate the specific trait
24+ containing an item, or rename items in ` use ` statements.
25+ * ** ` async ` ** : Return a ` Future ` instead of blocking the current thread.
26+ * ** ` await ` ** : Suspend execution until the result of a ` Future ` is ready.
27+ * ** ` break ` ** : Exit a loop immediately.
28+ * ** ` const ` ** : Define constant items or constant raw pointers.
29+ * ** ` continue ` ** : Continue to the next loop iteration.
30+ * ** ` crate ` ** : In a module path, refers to the crate root.
31+ * ** ` dyn ` ** : Dynamic dispatch to a trait object.
32+ * ** ` else ` ** : Fallback for ` if ` and ` if let ` control flow constructs.
33+ * ** ` enum ` ** : Define an enumeration.
34+ * ** ` extern ` ** : Link an external function or variable.
35+ * ** ` false ` ** : Boolean false literal.
36+ * ** ` fn ` ** : Define a function or the function pointer type.
37+ * ** ` for ` ** : Loop over items from an iterator, implement a trait, or specify a
38+ higher ranked lifetime.
39+ * ** ` if ` ** : Branch based on the result of a conditional expression.
40+ * ** ` impl ` ** : Implement inherent or trait functionality.
41+ * ** ` in ` ** : Part of ` for ` loop syntax.
42+ * ** ` let ` ** : Bind a variable.
43+ * ** ` loop ` ** : Loop unconditionally.
44+ * ** ` match ` ** : Match a value to patterns.
45+ * ** ` mod ` ** : Define a module.
46+ * ** ` move ` ** : Make a closure take ownership of all its captures.
47+ * ** ` mut ` ** : Denote mutability in references, raw pointers, or pattern bindings.
48+ * ** ` pub ` ** : Denote public visibility in struct fields, ` impl ` blocks, or
49+ modules.
50+ * ** ` ref ` ** : Bind by reference.
51+ * ** ` return ` ** : Return from function.
52+ * ** ` Self ` ** : A type alias for the type we are defining or implementing.
53+ * ** ` self ` ** : Method subject or current module.
54+ * ** ` static ` ** : Global variable or lifetime lasting the entire program
55+ execution.
56+ * ** ` struct ` ** : Define a structure.
57+ * ** ` super ` ** : Parent module of the current module.
58+ * ** ` trait ` ** : Define a trait.
59+ * ** ` true ` ** : Boolean true literal.
60+ * ** ` type ` ** : Define a type alias or associated type.
61+ * ** ` union ` ** : Define a union; is a keyword only when
62+ used in a union declaration.
63+ * ** ` unsafe ` ** : Denote unsafe code, functions, traits, or implementations.
64+ * ** ` use ` ** : Bring symbols into scope.
65+ * ** ` where ` ** : Denote clauses that constrain a type.
66+ * ** ` while ` ** : Loop conditionally based on the result of an expression.
67+
68+ ### Keywords Reserved for Future Use
6969
7070The following keywords do not yet have any functionality but are reserved by
7171Rust for potential future use:
@@ -75,6 +75,7 @@ Rust for potential future use:
7575* ` box `
7676* ` do `
7777* ` final `
78+ * ` gen `
7879* ` macro `
7980* ` override `
8081* ` priv `
@@ -84,7 +85,7 @@ Rust for potential future use:
8485* ` virtual `
8586* ` yield `
8687
87- ## Raw Identifiers
88+ ### Raw Identifiers
8889
8990* Raw identifiers* are the syntax that lets you use keywords where they wouldn’t
9091normally be allowed. You use a raw identifier by prefixing a keyword with ` r# ` .
0 commit comments