File tree 2 files changed +3
-16
lines changed
2 files changed +3
-16
lines changed Original file line number Diff line number Diff line change 302
302
#![ feature( let_chains) ]
303
303
#![ feature( link_cfg) ]
304
304
#![ feature( linkage) ]
305
+ #![ feature( macro_metavar_expr_concat) ]
305
306
#![ feature( min_exhaustive_patterns) ]
306
307
#![ feature( min_specialization) ]
307
308
#![ feature( must_not_suspend) ]
Original file line number Diff line number Diff line change @@ -168,14 +168,7 @@ pub(crate) macro syscall {
168
168
if let Some ( fun) = $name. get ( ) {
169
169
fun ( $( $arg_name) , * )
170
170
} 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
179
172
}
180
173
}
181
174
)
@@ -185,14 +178,7 @@ pub(crate) macro syscall {
185
178
pub( crate ) macro raw_syscall {
186
179
( fn $name: ident( $( $arg_name: ident: $t: ty) , * ) -> $ret: ty) => (
187
180
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
196
182
}
197
183
)
198
184
}
You can’t perform that action at this time.
0 commit comments