Skip to content

Commit e793ca8

Browse files
authored
Merge pull request #55 from matthewjasper/document-1219
Document RFC 1219: `use` group `as`
2 parents 8a02263 + 610b3b1 commit e793ca8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/items.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,16 @@ path required to refer to a module item. These declarations may appear in
170170
171171
Use declarations support a number of convenient shortcuts:
172172

173-
* Rebinding the target name as a new local name, using the syntax `use p::q::r as x;`
174173
* Simultaneously binding a list of paths differing only in their final element,
175174
using the glob-like brace syntax `use a::b::{c,d,e,f};`
176-
* Binding all paths matching a given prefix, using the asterisk wildcard syntax
177-
`use a::b::*;`
178175
* Simultaneously binding a list of paths differing only in their final element
179176
and their immediate parent module, using the `self` keyword, such as
180177
`use a::b::{self, c, d};`
178+
* Rebinding the target name as a new local name, using the syntax `use p::q::r
179+
as x;`. This can also be used with the last two features: `use a::b::{self as
180+
ab, c as abc}`.
181+
* Binding all paths matching a given prefix, using the asterisk wildcard syntax
182+
`use a::b::*;`
181183

182184
An example of `use` declarations:
183185

0 commit comments

Comments
 (0)