Skip to content

Commit

Permalink
DOCS: update reference about paths
Browse files Browse the repository at this point in the history
  • Loading branch information
matklad committed Dec 5, 2015
1 parent 35decad commit c8b7e24
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/doc/reference.md
Expand Up @@ -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
Expand Down

0 comments on commit c8b7e24

Please sign in to comment.