File tree Expand file tree Collapse file tree 2 files changed +38
-1
lines changed 
tests/rustdoc/inline_local Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,26 @@ impl DocFolder for StabilityPropagator<'_, '_> {
3636
3737        let  stability = match  item. item_id  { 
3838            ItemId :: DefId ( def_id)  => { 
39-                 let  own_stability = self . cx . tcx . lookup_stability ( def_id) ; 
39+                 let  item_stability = self . cx . tcx . lookup_stability ( def_id) ; 
40+                 let  inline_stability =
41+                     item. inline_stmt_id . and_then ( |did| self . cx . tcx . lookup_stability ( did) ) ; 
42+                 let  own_stability = if  let  Some ( item_stab)  = item_stability
43+                     && let  StabilityLevel :: Stable  {  since :  _,  allowed_through_unstable_modules }  =
44+                         item_stab. level 
45+                     && let  Some ( mut  inline_stab)  = inline_stability
46+                     && let  StabilityLevel :: Stable  { 
47+                         since :  inline_since, 
48+                         allowed_through_unstable_modules :  _, 
49+                     }  = inline_stab. level 
50+                 { 
51+                     inline_stab. level  = StabilityLevel :: Stable  { 
52+                         since :  inline_since, 
53+                         allowed_through_unstable_modules, 
54+                     } ; 
55+                     Some ( inline_stab) 
56+                 }  else  { 
57+                     item_stability
58+                 } ; 
4059
4160                let  ( ItemKind :: StrippedItem ( box kind)  | kind)  = & item. kind ; 
4261                match  kind { 
Original file line number Diff line number Diff line change 1+ // https://github.com/rust-lang/rust/issues/135078 
2+ #![ crate_name = "foo" ]  
3+ #![ feature( staged_api) ]  
4+ #![ stable( feature = "v1" ,  since="1.0.0" ) ]  
5+ 
6+ #[ stable( feature = "v1" ,  since="1.0.0" ) ]  
7+ pub  mod  ffi { 
8+     #[ stable( feature = "core_ffi" ,  since="1.99.0" ) ]  
9+     //@ has "foo/ffi/struct.CStr.html" "//span[@class='sub-heading']/span[@class='since']" "1.99.0" 
10+     //@ !has - "//span[@class='sub-heading']/span[@class='since']" "1.0.0" 
11+     pub  struct  CStr ; 
12+ } 
13+ 
14+ #[ stable( feature = "v1" ,  since = "1.0.0" ) ]  
15+ #[ doc( inline) ]  
16+ //@ has "foo/struct.CStr.html" "//span[@class='sub-heading']/span[@class='since']" "1.0.0" 
17+ //@ !has - "//span[@class='sub-heading']/span[@class='since']" "1.99.0" 
18+ pub  use  ffi:: CStr ; 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments