1
1
# Names
2
2
3
3
An * entity* is a language construct that can be referred to in some way within
4
- the source program, usually via a [ * path* ] . Entities include [ types] , [ items] ,
4
+ the source program, usually via a [ path] . Entities include [ types] , [ items] ,
5
5
[ generic parameters] , [ variable bindings] , [ loop labels] , [ lifetimes] ,
6
6
[ fields] , [ attributes] , and [ lints] .
7
7
8
8
A * declaration* is a syntactical construct that can introduce a * name* to
9
9
refer to an entity. Entity names are valid within a [ * scope* ] — a region of
10
10
source text where that name may be referenced.
11
11
12
- Some entities are [ explicitly declared] ( #explicit- entities ) in the source
13
- code, and some are [ implicitly declared] ( #implicit- entities ) as part of the
14
- language or compiler extensions.
12
+ Some entities are [ explicitly declared] ( #explicitly-declared- entities ) in the
13
+ source code, and some are [ implicitly declared] ( #implicitly-declared- entities )
14
+ as part of the language or compiler extensions.
15
15
16
16
[ * Paths* ] are used to refer to an entity, possibly in another scope. Lifetimes
17
17
and loop labels use a [ dedicated syntax] [ lifetimes-and-loop-labels ] using a
@@ -25,7 +25,7 @@ and labels to entity declarations.
25
25
26
26
Access to certain names may be restricted based on their [ * visibility* ] .
27
27
28
- ## Explicit entities
28
+ ## Explicitly declared entities
29
29
30
30
Entities that explicitly introduce a name in the source code are:
31
31
@@ -59,7 +59,7 @@ Entities that explicitly introduce a name in the source code are:
59
59
Additionally, [ macro invocations] and [ attributes] can introduce names by
60
60
expanding to one of the above items.
61
61
62
- ## Implicit entities
62
+ ## Implicitly declared entities
63
63
64
64
The following entities are implicitly defined by the language, or are
65
65
introduced by compiler options and extensions:
@@ -85,7 +85,6 @@ to with certain [path qualifiers] or aliases.
85
85
86
86
[ *Name resolution* ] : names/name-resolution.md
87
87
[ *namespaces* ] : names/namespaces.md
88
- [ *path* ] : paths.md
89
88
[ *paths* ] : paths.md
90
89
[ *scope* ] : names/scopes.md
91
90
[ *visibility* ] : visibility-and-privacy.md
@@ -128,6 +127,7 @@ to with certain [path qualifiers] or aliases.
128
127
[ macro invocations ] : macros.md#macro-invocation
129
128
[ matcher metavariables ] : macros-by-example.md#metavariables
130
129
[ Module declarations ] : items/modules.md
130
+ [ path ] : paths.md
131
131
[ path qualifiers ] : paths.md#path-qualifiers
132
132
[ Standard library prelude ] : names/preludes.md#standard-library-prelude
133
133
[ Static item declarations ] : items/static-items.md
0 commit comments