summary refs log tree commit diff
path: root/src/doc/reference.md
diff options
context:
space:
mode:
authorBarosl LEE <github@barosl.com>2015-01-21 02:16:53 +0900
committerBarosl LEE <github@barosl.com>2015-01-21 02:16:53 +0900
commit9752924dff53530050e5b236500a6551482be341 (patch)
tree82c45804038385f898819266d6a145ee783ec727 /src/doc/reference.md
parent01ae97b45eb54c888e0425693069270542694c77 (diff)
parent195fd9a2b41ed9b5294f8803aeb84c1ace673e5e (diff)
downloadrust-9752924dff53530050e5b236500a6551482be341.tar.gz
rust-9752924dff53530050e5b236500a6551482be341.zip
Rollup merge of #21179 - nodakai:reference-mod-to-self, r=huonw
This should have been done together with 56dcbd17fdad5d39b7b02e22a7490d2468718d08 for rust-lang/rust#20361
Diffstat (limited to 'src/doc/reference.md')
-rw-r--r--src/doc/reference.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/doc/reference.md b/src/doc/reference.md
index e2c61e0a8bd..a1954bfdbc8 100644
--- a/src/doc/reference.md
+++ b/src/doc/reference.md
@@ -971,7 +971,7 @@ path_glob : ident [ "::" [ path_glob
                           | '*' ] ] ?
           | '{' path_item [ ',' path_item ] * '}' ;
 
-path_item : ident | "mod" ;
+path_item : ident | "self" ;
 ```
 
 A _use declaration_ creates one or more local name bindings synonymous with
@@ -991,15 +991,15 @@ Use declarations support a number of convenient shortcuts:
 * Binding all paths matching a given prefix, using the asterisk wildcard syntax
   `use a::b::*;`
 * Simultaneously binding a list of paths differing only in their final element
-  and their immediate parent module, using the `mod` keyword, such as
-  `use a::b::{mod, c, d};`
+  and their immediate parent module, using the `self` keyword, such as
+  `use a::b::{self, c, d};`
 
 An example of `use` declarations:
 
 ```
 use std::iter::range_step;
 use std::option::Option::{Some, None};
-use std::collections::hash_map::{mod, HashMap};
+use std::collections::hash_map::{self, HashMap};
 
 fn foo<T>(_: T){}
 fn bar(map1: HashMap<String, usize>, map2: hash_map::HashMap<String, usize>){}