Skip to content

Commit 195fd9a

Browse files
committed
reference.md: change "mod" to "self" in "use" declaration.
This should have been done together with 56dcbd1 for #20361 Signed-off-by: NODA, Kai <[email protected]>
1 parent 451e134 commit 195fd9a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/doc/reference.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ path_glob : ident [ "::" [ path_glob
971971
| '*' ] ] ?
972972
| '{' path_item [ ',' path_item ] * '}' ;
973973
974-
path_item : ident | "mod" ;
974+
path_item : ident | "self" ;
975975
```
976976

977977
A _use declaration_ creates one or more local name bindings synonymous with
@@ -991,15 +991,15 @@ Use declarations support a number of convenient shortcuts:
991991
* Binding all paths matching a given prefix, using the asterisk wildcard syntax
992992
`use a::b::*;`
993993
* Simultaneously binding a list of paths differing only in their final element
994-
and their immediate parent module, using the `mod` keyword, such as
995-
`use a::b::{mod, c, d};`
994+
and their immediate parent module, using the `self` keyword, such as
995+
`use a::b::{self, c, d};`
996996

997997
An example of `use` declarations:
998998

999999
```
10001000
use std::iter::range_step;
10011001
use std::option::Option::{Some, None};
1002-
use std::collections::hash_map::{mod, HashMap};
1002+
use std::collections::hash_map::{self, HashMap};
10031003
10041004
fn foo<T>(_: T){}
10051005
fn bar(map1: HashMap<String, uint>, map2: hash_map::HashMap<String, uint>){}

0 commit comments

Comments
 (0)