File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -135,6 +135,20 @@ macro_rules! macro_def {
135135#[ pin_v2]   //~ ERROR `#[pin_v2]` attribute cannot be used on macro calls 
136136macro_def ! ( ) ; 
137137
138+ // Restricted on architectures where inline assembly is stable 
139+ // accroding to `compiler/rustc_ast_lowering/src/asm.rs` 
140+ #[ cfg( any(  
141+     target_arch = "x86" ,  
142+     target_arch = "x86_64" ,  
143+     target_arch = "arm" ,  
144+     target_arch = "aarch64" ,  
145+     target_arch = "arm64ec" ,  
146+     target_arch = "riscv32" ,  
147+     target_arch = "riscv64" ,  
148+     target_arch = "loongarch32" ,  
149+     target_arch = "loongarch64" ,  
150+     target_arch = "s390x" ,  
151+ ) ) ] 
138152std:: arch:: global_asm! { 
139153    "{}" , 
140154    #[ pin_v2]  //~ ERROR this attribute is not supported on assembly 
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ LL | #[pin_v2]
77   = help: `#[pin_v2]` can be applied to data types and unions
88
99error: this attribute is not supported on assembly
10-   --> $DIR/pin_v2-attr.rs:140 :5
10+   --> $DIR/pin_v2-attr.rs:154 :5
1111   |
1212LL |     #[pin_v2]
1313   |     ^^^^^^^^^
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments