We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 24a1633 + c8b7e24 commit ac2cb1fCopy full SHA for ac2cb1f
src/doc/reference.md
@@ -515,6 +515,25 @@ fn bar() {
515
# fn main() {}
516
```
517
518
+Additionally keyword `super` may be repeated several times after the first
519
+`super` or `self` to refer to ancestor modules.
520
+
521
+```rust
522
+mod a {
523
+ fn foo() {}
524
525
+ mod b {
526
+ mod c {
527
+ fn foo() {
528
+ super::super::foo(); // call a's foo function
529
+ self::super::super::foo(); // call a's foo function
530
+ }
531
532
533
+}
534
+# fn main() {}
535
+```
536
537
# Syntax extensions
538
539
A number of minor features of Rust are not central enough to have their own
0 commit comments