File tree Expand file tree Collapse file tree 2 files changed +3
-16
lines changed Expand file tree Collapse file tree 2 files changed +3
-16
lines changed Original file line number Diff line number Diff line change 302302#![ feature( let_chains) ]
303303#![ feature( link_cfg) ]
304304#![ feature( linkage) ]
305+ #![ feature( macro_metavar_expr_concat) ]
305306#![ feature( min_exhaustive_patterns) ]
306307#![ feature( min_specialization) ]
307308#![ feature( must_not_suspend) ]
Original file line number Diff line number Diff line change @@ -168,14 +168,7 @@ pub(crate) macro syscall {
168168 if let Some ( fun) = $name. get ( ) {
169169 fun ( $( $arg_name) , * )
170170 } else {
171- // This looks like a hack, but concat_idents only accepts idents
172- // (not paths).
173- use libc:: * ;
174-
175- syscall (
176- concat_idents ! ( SYS_ , $name) ,
177- $( $arg_name) , *
178- ) as $ret
171+ libc:: syscall ( libc:: ${ concat ( SYS_ , $name) } , $( $arg_name) , * ) as $ret
179172 }
180173 }
181174 )
@@ -185,14 +178,7 @@ pub(crate) macro syscall {
185178pub( crate ) macro raw_syscall {
186179 ( fn $name: ident( $( $arg_name: ident: $t: ty) , * ) -> $ret: ty) => (
187180 unsafe fn $name( $( $arg_name: $t) , * ) -> $ret {
188- // This looks like a hack, but concat_idents only accepts idents
189- // (not paths).
190- use libc:: * ;
191-
192- syscall (
193- concat_idents ! ( SYS_ , $name) ,
194- $( $arg_name) , *
195- ) as $ret
181+ libc:: syscall ( libc:: ${ concat ( SYS_ , $name) } , $( $arg_name) , * ) as $ret
196182 }
197183 )
198184}
You can’t perform that action at this time.
0 commit comments