about summary refs log tree commit diff
path: root/src/doc/reference.md
diff options
context:
space:
mode:
authorAleksey Kladov <aleksey.kladov@gmail.com>2015-12-05 21:55:34 +0300
committerAleksey Kladov <aleksey.kladov@gmail.com>2015-12-05 21:55:34 +0300
commitc8b7e24b142d5599f6f5eaefb0e98e7403b9b975 (patch)
treed47fe53c8c0f04951233309ca7be5887294e0795 /src/doc/reference.md
parent35decad78124b251822eb4666638455224d3f0c8 (diff)
downloadrust-c8b7e24b142d5599f6f5eaefb0e98e7403b9b975.tar.gz
rust-c8b7e24b142d5599f6f5eaefb0e98e7403b9b975.zip
DOCS: update reference about paths
Diffstat (limited to 'src/doc/reference.md')
-rw-r--r--src/doc/reference.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/doc/reference.md b/src/doc/reference.md
index 2ada86115b6..f5e367d6e5f 100644
--- a/src/doc/reference.md
+++ b/src/doc/reference.md
@@ -509,6 +509,25 @@ fn bar() {
 # fn main() {}
 ```
 
+Additionally keyword `super` may be repeated several times after the first
+`super` or `self` to refer to ancestor modules.
+
+```rust
+mod a {
+    fn foo() {}
+
+    mod b {
+        mod c {
+            fn foo() {
+                super::super::foo(); // call a's foo function
+                self::super::super::foo(); // call a's foo function
+            }
+        }
+    }
+}
+# fn main() {}
+```
+
 # Syntax extensions
 
 A number of minor features of Rust are not central enough to have their own