File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 17
17
* The [ machine types] (integer and floating-point).
18
18
* The [ machine-dependent integer types] .
19
19
* The [ textual types] ` char ` and ` str ` .
20
+ * The [ never type] ` ! `
20
21
21
22
There are also some primitive constructs for generic types built in to the
22
23
language:
@@ -31,6 +32,7 @@ language:
31
32
[ machine types ] : #machine-types
32
33
[ machine-dependent integer types ] : #machine-dependent-integer-types
33
34
[ textual types ] : #textual-types
35
+ [ never-type ] : #never-type
34
36
[ Tuples ] : #tuple-types
35
37
[ Arrays ] : #array-and-slice-types
36
38
[ Slices ] : #array-and-slice-types
@@ -84,6 +86,13 @@ unsigned bytes holding a sequence of UTF-8 code points. Since `str` is a
84
86
[ dynamically sized type] , it is not a _ first-class_ type, but can only be
85
87
instantiated through a pointer type, such as ` &str ` .
86
88
89
+ ## Never type
90
+
91
+ The never type ` ! ` is a type with no values, representing the result of
92
+ computations that never complete. Although it has size ` 0 ` the empty bit
93
+ pattern is not a valid representation. Expressions of type ` ! ` can be coerced
94
+ into any other type.
95
+
87
96
## Tuple types
88
97
89
98
A tuple * type* is a heterogeneous product of other types, called the * elements*
You can’t perform that action at this time.
0 commit comments