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.
1 parent 35decad commit c8b7e24Copy full SHA for c8b7e24
src/doc/reference.md
@@ -509,6 +509,25 @@ fn bar() {
509
# fn main() {}
510
```
511
512
+Additionally keyword `super` may be repeated several times after the first
513
+`super` or `self` to refer to ancestor modules.
514
+
515
+```rust
516
+mod a {
517
+ fn foo() {}
518
519
+ mod b {
520
+ mod c {
521
+ fn foo() {
522
+ super::super::foo(); // call a's foo function
523
+ self::super::super::foo(); // call a's foo function
524
+ }
525
526
527
+}
528
+# fn main() {}
529
+```
530
531
# Syntax extensions
532
533
A number of minor features of Rust are not central enough to have their own
0 commit comments