Skip to content

[macro_metavar_expr_concat] Dogfooding - #128491

Merged
bors merged 1 commit into
rust-lang:masterfrom
c410-f3r:unlock-rfc-2011
Aug 2, 2024
Merged

[macro_metavar_expr_concat] Dogfooding#128491
bors merged 1 commit into
rust-lang:masterfrom
c410-f3r:unlock-rfc-2011

Conversation

@c410-f3r

@c410-f3r c410-f3r commented Aug 1, 2024

Copy link
Copy Markdown
Contributor

cc #124225

Starts inner usage to test the robustness of the implementation.

@rustbot

rustbot commented Aug 1, 2024

Copy link
Copy Markdown
Collaborator

r? @workingjubilee

rustbot has assigned @workingjubilee.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added O-unix Operating system: Unix-like S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 1, 2024
Comment thread library/std/src/sys/pal/unix/weak.rs Outdated
concat_idents!(SYS_, $name),
$($arg_name),*
) as $ret
syscall(${concat(SYS_, $name)}, $($arg_name),*) as $ret

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

and then delete the comment and import above

Comment thread library/std/src/sys/pal/unix/weak.rs Outdated
concat_idents!(SYS_, $name),
$($arg_name),*
) as $ret
syscall(${concat(SYS_, $name)}, $($arg_name),*) as $ret

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

same here

@c410-f3r

c410-f3r commented Aug 1, 2024

Copy link
Copy Markdown
Contributor Author

Done

@rust-log-analyzer

This comment has been minimized.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity (you do not have to change to this), would this work?

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

@workingjubilee workingjubilee left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat.

Comment on lines -171 to -173
// This looks like a hack, but concat_idents only accepts idents
// (not paths).
use libc::*;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no this absolutely was a brutal hack.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a beautiful example of why it eas terrible

@workingjubilee

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Aug 2, 2024

Copy link
Copy Markdown
Collaborator

📌 Commit b2f7e71 has been approved by workingjubilee

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 2, 2024
@bors
bors merged commit 55ed05c into rust-lang:master Aug 2, 2024
@rustbot rustbot added this to the 1.82.0 milestone Aug 2, 2024
@tgross35 tgross35 added the F-macro_metavar_expr_concat `#![feature(macro_metavar_expr_concat)]` label Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

F-macro_metavar_expr_concat `#![feature(macro_metavar_expr_concat)]` O-unix Operating system: Unix-like S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants