File tree 1 file changed +18
-2
lines changed
1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -1147,10 +1147,26 @@ mod struct_keyword {}
1147
1147
//
1148
1148
/// The parent of the current [module].
1149
1149
///
1150
- /// The documentation for this keyword is [not yet complete]. Pull requests welcome!
1150
+ /// ```rust
1151
+ /// # #![allow(dead_code)]
1152
+ /// # fn main() {}
1153
+ /// mod a {
1154
+ /// pub fn foo() {}
1155
+ /// }
1156
+ /// mod b {
1157
+ /// pub fn foo() {
1158
+ /// super::a::foo(); // call a's foo function
1159
+ /// }
1160
+ /// }
1161
+ /// ```
1162
+ ///
1163
+ /// It is also possible to use `super` multiple times: `super::super::foo`,
1164
+ /// going up the ancestor chain.
1165
+ ///
1166
+ /// See the [Reference] for more information.
1151
1167
///
1152
1168
/// [module]: ../reference/items/modules.html
1153
- /// [not yet complete ]: https://github.com/rust-lang/rust/issues/34601
1169
+ /// [Reference ]: ../reference/paths.html#super
1154
1170
mod super_keyword { }
1155
1171
1156
1172
#[ doc( keyword = "trait" ) ]
You can’t perform that action at this time.
0 commit comments