File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -181,19 +181,23 @@ impl Span {
181181#[ inline]  
182182    pub  fn  ctxt ( self )  -> SyntaxContext  { 
183183        let  ctxt_or_tag = self . ctxt_or_tag  as  u32 ; 
184-         if  ctxt_or_tag <= MAX_CTXT  { 
185-             if  self . len_or_tag  == LEN_TAG  || self . len_or_tag  &  PARENT_MASK  == 0  { 
186-                 // Inline format or interned format with inline ctxt. 
187-                 SyntaxContext :: from_u32 ( ctxt_or_tag) 
184+         // Check for interned format. 
185+         if  self . len_or_tag  == LEN_TAG  { 
186+             if  ctxt_or_tag == CTXT_TAG  { 
187+                 // Fully interned format. 
188+                 let  index = self . base_or_index ; 
189+                 with_span_interner ( |interner| interner. spans [ index as  usize ] . ctxt ) 
188190            }  else  { 
189-                 // Inline format or interned format with inline parent. 
190-                 // We know that the SyntaxContext is root. 
191-                 SyntaxContext :: root ( ) 
191+                 // Interned format with inline ctxt. 
192+                 SyntaxContext :: from_u32 ( ctxt_or_tag) 
192193            } 
194+         }  else  if  self . len_or_tag  &  PARENT_MASK  == 0  { 
195+             // Inline format with inline ctxt. 
196+             SyntaxContext :: from_u32 ( ctxt_or_tag) 
193197        }  else  { 
194-             // Interned  format. 
195-             let  index =  self . base_or_index ; 
196-             with_span_interner ( |interner| interner . spans [ index  as   usize ] . ctxt ) 
198+             // Inline  format with inline parent . 
199+             // We know that the SyntaxContext is root. 
200+             SyntaxContext :: root ( ) 
197201        } 
198202    } 
199203} 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments