File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -1147,10 +1147,26 @@ mod struct_keyword {}
11471147// 
11481148/// The parent of the current [module]. 
11491149/// 
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. 
11511167/// 
11521168/// [module]: ../reference/items/modules.html 
1153- /// [not yet complete ]: https://github.com/rust-lang/rust/issues/34601  
1169+ /// [Reference ]: ../reference/paths.html#super  
11541170mod  super_keyword { } 
11551171
11561172#[ doc( keyword = "trait" ) ]  
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments