Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build and CLI behaviour for stdarch-gen-arm. #1705

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jacobbramley
Copy link
Contributor

Fix the stdarch-gen-arm build by correcting misuse of proc_macro2::Punct. Our usage was always incorrect, but recent versions of Punct::new include assertions that show it.

Also fix the generated.rs path inference.

Restructure stdarch-gen-arm to use `Group`s with `Delimiter`s rather
than ad-hoc `Punct`s.

`Punct` should only be used to represent specific characters, and never
for bracket-like characters. Recent versions of `Punct::new` check this
with an assertion.

Note that there doesn't appear to be a way to emit a line break for
formatting reasons — `Punct::new('\n', ...)` no longer works — so this
also removes all blank lines between functions in the generated files.
@rustbot
Copy link
Collaborator

rustbot commented Jan 30, 2025

r? @Amanieu

rustbot has assigned @Amanieu.
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

Fix both the instructions for how to regenerate each `generated.rs`, and
the logic for inferring the correct output path from each input
`.spec.yml`.
@jacobbramley
Copy link
Contributor Author

Someone commented that I'd forgotten to regenerate the files. For some reason, I can't see the comment on GitHub, but they were right; the instructions at the top of each generated.rs still point to the old generator. I'll fix that shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants