DOCS: update reference about paths
This commit is contained in:
parent
35decad781
commit
c8b7e24b14
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user