Skip to content

Commit

Permalink
Unrolled build for rust-lang#128491
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#128491 - c410-f3r:unlock-rfc-2011, r=workingjubilee

[`macro_metavar_expr_concat`] Dogfooding

cc rust-lang#124225

Starts inner usage to test the robustness of the implementation.
  • Loading branch information
rust-timer authored Aug 2, 2024
2 parents 05e692a + b2f7e71 commit 16013a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
1 change: 1 addition & 0 deletions library/std/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@
#![feature(let_chains)]
#![feature(link_cfg)]
#![feature(linkage)]
#![feature(macro_metavar_expr_concat)]
#![feature(min_exhaustive_patterns)]
#![feature(min_specialization)]
#![feature(must_not_suspend)]
Expand Down
18 changes: 2 additions & 16 deletions library/std/src/sys/pal/unix/weak.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,7 @@ pub(crate) macro syscall {
if let Some(fun) = $name.get() {
fun($($arg_name),*)
} else {
// This looks like a hack, but concat_idents only accepts idents
// (not paths).
use libc::*;

syscall(
concat_idents!(SYS_, $name),
$($arg_name),*
) as $ret
libc::syscall(libc::${concat(SYS_, $name)}, $($arg_name),*) as $ret
}
}
)
Expand All @@ -185,14 +178,7 @@ pub(crate) macro syscall {
pub(crate) macro raw_syscall {
(fn $name:ident($($arg_name:ident: $t:ty),*) -> $ret:ty) => (
unsafe fn $name($($arg_name:$t),*) -> $ret {
// This looks like a hack, but concat_idents only accepts idents
// (not paths).
use libc::*;

syscall(
concat_idents!(SYS_, $name),
$($arg_name),*
) as $ret
libc::syscall(libc::${concat(SYS_, $name)}, $($arg_name),*) as $ret
}
)
}

0 comments on commit 16013a7

Please sign in to comment.