@@ -61,6 +61,13 @@ through a mechanism called ‘trait objects’.
6161
6262A dynamically sized type (DST) is a type without a statically known size or alignment.
6363
64+ ### Entity
65+
66+ An [ * entity* ] is a language construct that can be referred to in some way
67+ within the source program, usually via a [ path] [ paths ] . Entities include
68+ [ types] , [ items] , [ generic parameters] , [ variable bindings] , [ loop labels] ,
69+ [ lifetimes] , [ fields] , [ attributes] , and [ lints] .
70+
6471### Expression
6572
6673An expression is a combination of values, constants, variables, operators
@@ -123,6 +130,28 @@ This is not affected by applied type arguments. `struct Foo` is considered local
123130` Vec<Foo> ` is not. ` LocalType<ForeignType> ` is local. Type aliases do not
124131affect locality.
125132
133+ ### Name
134+
135+ A [ * name* ] is an [ identifier] or [ lifetime or loop label] that refers to an
136+ [ entity] ( #entity ) . A * name binding* is when an entity declaration introduces
137+ an identifier or label associated with that entity. [ Paths] ,
138+ identifiers, and labels are used to refer to an entity.
139+
140+ ### Name resolution
141+
142+ [ * Name resolution* ] is the compile-time process of tying [ paths] ,
143+ [ identifiers] , and [ labels] to [ entity] ( #entity ) declarations.
144+
145+ ### Namespace
146+
147+ A * namespace* is a logical grouping of declared [ names] ( #name ) based on the
148+ kind of [ entity] ( #entity ) the name refers to. Namespaces allow the occurrence
149+ of a name in one namespace to not conflict with the same name in another
150+ namespace.
151+
152+ Within a namespace, names are organized in a hierarchy, where each level of
153+ the hierarchy has its own collection of named entities.
154+
126155### Nominal types
127156
128157Types that can be referred to by a path directly. Specifically [ enums] ,
@@ -133,11 +162,22 @@ Types that can be referred to by a path directly. Specifically [enums],
133162[ Traits] that can be used as [ trait objects] . Only traits that follow specific
134163[ rules] [ object safety ] are object safe.
135164
165+ ### Path
166+
167+ A [ * path* ] is a sequence of one or more path segments used to refer to an
168+ [ entity] ( #entity ) in the current scope or other levels of a
169+ [ namespace] ( #namespace ) hierarchy.
170+
136171### Prelude
137172
138173Prelude, or The Rust Prelude, is a small collection of items - mostly traits - that are
139174imported into every module of every crate. The traits in the prelude are pervasive.
140175
176+ ### Scope
177+
178+ A [ * scope* ] is the region of source text where a named [ entity] ( #entity ) may
179+ be referenced with that name.
180+
141181### Scrutinee
142182
143183A scrutinee is the expression that is matched on in ` match ` expressions and
@@ -216,17 +256,37 @@ example of an uninhabited type is the [never type] `!`, or an enum with no varia
216256
217257[ alignment ] : type-layout.md#size-and-alignment
218258[ associated item ] : #associated-item
259+ [ attributes ] : attributes.md
260+ [ *entity* ] : names.md
219261[ enums ] : items/enumerations.md
262+ [ fields ] : expressions/field-expr.md
220263[ free item ] : #free-item
264+ [ generic parameters ] : items/generics.md
265+ [ identifier ] : identifiers.md
266+ [ identifiers ] : identifiers.md
221267[ implementation ] : items/implementations.md
222268[ implementations ] : items/implementations.md
223269[ inherent implementation ] : items/implementations.md#inherent-implementations
224270[ item ] : items.md
271+ [ items ] : items.md
272+ [ labels ] : tokens.md#lifetimes-and-loop-labels
273+ [ lifetime or loop label ] : tokens.md#lifetimes-and-loop-labels
274+ [ lifetimes ] : tokens.md#lifetimes-and-loop-labels
275+ [ lints ] : attributes/diagnostics.md#lint-check-attributes
276+ [ loop labels ] : tokens.md#lifetimes-and-loop-labels
225277[ method ] : items/associated-items.md#methods
278+ [ *Name resolution* ] : names/name-resolution.md
279+ [ *name* ] : names.md
280+ [ *namespace* ] : names/namespaces.md
226281[ never type ] : types/never.md
227282[ object safety ] : items/traits.md#object-safety
283+ [ *path* ] : paths.md
284+ [ Paths ] : paths.md
285+ [ *scope* ] : names/scopes.md
228286[ structs ] : items/structs.md
229287[ trait objects ] : types/trait-object.md
230288[ traits ] : items/traits.md
289+ [ types ] : types.md
231290[ undefined-behavior ] : behavior-considered-undefined.md
232291[ unions ] : items/unions.md
292+ [ variable bindings ] : patterns.md
0 commit comments