File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -841,12 +841,16 @@ impl Constant {
841841                language_backend. write_literal ( out,  value) ; 
842842            } 
843843            Language :: Cython  => { 
844-                 out. write ( "const " ) ; 
845-                 language_backend. write_type ( out,  & self . ty ) ; 
846-                 // For extern Cython declarations the initializer is ignored, 
847-                 // but still useful as documentation, so we write it as a comment. 
848-                 write ! ( out,  " {} # = " ,  name) ; 
849-                 language_backend. write_literal ( out,  value) ; 
844+                 if  matches ! ( self . value,  Literal :: PanicMacro ( _) )  { 
845+                     // Cython don't have a equivalent to `#error` directive 
846+                 }  else  { 
847+                     out. write ( "const " ) ; 
848+                     language_backend. write_type ( out,  & self . ty ) ; 
849+                     // For extern Cython declarations the initializer is ignored, 
850+                     // but still useful as documentation, so we write it as a comment. 
851+                     write ! ( out,  " {} # = " ,  name) ; 
852+                     language_backend. write_literal ( out,  value) ; 
853+                 } 
850854            } 
851855        } 
852856
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments