@@ -27,7 +27,7 @@ pub fn kernel(input: proc_macro::TokenStream, item: proc_macro::TokenStream) ->
2727 let mut item = parse_macro_input ! ( item as ItemFn ) ;
2828 let no_mangle = parse_quote ! ( #[ no_mangle] ) ;
2929 item. attrs . push ( no_mangle) ;
30- let internal = parse_quote ! ( #[ cfg_attr( any ( target_arch="nvptx" , target_arch= " nvptx64") , nvvm_internal( kernel( #input) ) ) ] ) ;
30+ let internal = parse_quote ! ( #[ cfg_attr( target_arch="nvptx64" , nvvm_internal( kernel( #input) ) ) ] ) ;
3131 item. attrs . push ( internal) ;
3232
3333 // used to guarantee some things about how params are passed in the codegen.
@@ -156,7 +156,7 @@ pub fn gpu_only(_attr: proc_macro::TokenStream, item: proc_macro::TokenStream) -
156156
157157 let mut cloned_attrs = attrs. clone ( ) ;
158158 cloned_attrs. retain ( |a| {
159- !a. path
159+ !a. path ( )
160160 . get_ident ( )
161161 . map ( |x| * x == "nvvm_internal" )
162162 . unwrap_or_default ( )
@@ -170,13 +170,13 @@ pub fn gpu_only(_attr: proc_macro::TokenStream, item: proc_macro::TokenStream) -
170170 } ;
171171
172172 let output = quote:: quote! {
173- #[ cfg( not( any ( target_arch="nvptx" , target_arch= " nvptx64") ) ) ]
173+ #[ cfg( not( target_arch="nvptx64" ) ) ]
174174 #[ allow( unused_variables) ]
175175 #( #cloned_attrs) * #vis #sig_cpu {
176176 unimplemented!( concat!( "`" , stringify!( #fn_name) , "` can only be used on the GPU with rustc_codegen_nvvm" ) )
177177 }
178178
179- #[ cfg( any ( target_arch="nvptx" , target_arch= " nvptx64") ) ]
179+ #[ cfg( target_arch="nvptx64" ) ]
180180 #( #attrs) * #vis #sig {
181181 #block
182182 }
@@ -199,7 +199,7 @@ pub fn externally_visible(
199199 let mut func = syn:: parse_macro_input!( item as syn:: ItemFn ) ;
200200
201201 assert ! (
202- func. attrs. iter( ) . any( |a| a. path. is_ident( "no_mangle" ) ) ,
202+ func. attrs. iter( ) . any( |a| a. path( ) . is_ident( "no_mangle" ) ) ,
203203 "#[externally_visible] function should also be #[no_mangle]"
204204 ) ;
205205
0 commit comments