File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 1
1
# Use declarations
2
2
3
+ > ** <sup >Syntax:<sup >**
4
+ > _ UseDeclaration_ :
5
+ >   ;  ;   ;  ; ` use ` [ _ SimplePath_ ]   ; (` as ` [ IDENTIFIER] )<sup >?</sup > ` ; `
6
+ >   ;  ; | ` use ` ([ _ SimplePath_ ] <sup >?</sup > ` :: ` )<sup >?</sup > ` { ` _ UseDeclarationItems_ ` } ` ` ; `
7
+ >   ;  ; | ` use ` ([ _ SimplePath_ ] <sup >?</sup > ` :: ` )<sup >?</sup > ` * ` ` ; `
8
+ >
9
+ > _ UseDeclarationItems_ :
10
+ >   ;  ; _ UseDeclarationItem_ ( ` , ` _ UseDeclarationItem_ )<sup >* </sup > ` , ` <sup >?<sup >
11
+ >
12
+ > _ UseDeclarationItem_ :
13
+ >   ;  ; ( ` self ` | [ IDENTIFIER] ) ( ` as ` [ IDENTIFIER] )<sup >?</sup >
14
+
3
15
A _ use declaration_ creates one or more local name bindings synonymous with
4
16
some other [ path] . Usually a ` use ` declaration is used to shorten the path
5
17
required to refer to a module item. These declarations may appear in [ modules]
@@ -111,3 +123,6 @@ mod foo {
111
123
112
124
fn main () {}
113
125
```
126
+
127
+ [ IDENTIFIER ] : identifiers.html
128
+ [ _SimplePath_ ] : paths.html
You can’t perform that action at this time.
0 commit comments