@@ -65,6 +65,12 @@ For example, `2 + (3 * 4)` is an expression that returns the value 14.
65
65
An [ item] that is not a member of an [ implementation] , such as a * free
66
66
function* or a * free const* . Contrast to an [ associated item] .
67
67
68
+ ### Inhabited
69
+
70
+ A type is inhabited if it has constructors and therefore can be instantiated. An inhabited type is
71
+ not "empty" in the sense that there can be values of the type. Opposite of
72
+ [ Uninhabited] ( #uninhabited ) .
73
+
68
74
### Inherent implementation
69
75
70
76
An [ implementation] that applies to a nominal type, not to a trait-type pair.
@@ -159,6 +165,13 @@ but is not limited to: process termination or corruption; improper, incorrect,
159
165
or unintended computation; or platform-specific results.
160
166
[ More] [ undefined-behavior ] .
161
167
168
+ ### Uninhabited
169
+
170
+ A type is uninhabited if it has no constructors and therefore can never be instantiated. An
171
+ uninhabited type is "empty" in the sense that there are no values of the type. The canonical
172
+ example of an uninhabited type is the [ never type] ` ! ` , or an enum with no variants
173
+ ` enum Never { } ` . Opposite of [ Inhabited] ( #inhabited ) .
174
+
162
175
[ alignment ] : type-layout.md#size-and-alignment
163
176
[ associated item ] : #associated-item
164
177
[ enums ] : items/enumerations.md
@@ -168,6 +181,7 @@ or unintended computation; or platform-specific results.
168
181
[ inherent implementation ] : items/implementations.md#inherent-implementations
169
182
[ item ] : items.md
170
183
[ method ] : items/associated-items.md#methods
184
+ [ never type ] : types/never.md
171
185
[ object safety ] : items/traits.md#object-safety
172
186
[ structs ] : items/structs.md
173
187
[ trait objects ] : types/trait-object.md
0 commit comments