-
Notifications
You must be signed in to change notification settings - Fork 152
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
generate: use token groups for delimited token streams #864
Conversation
455279e
to
7daf9e0
Compare
Looks like need to update some dependencies in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some parts could be slightly simplified, but the more complex restructuring of render_register_mod_debug
is exactly as I envisioned it.
src/generate/register.rs
Outdated
#[doc = #description] | ||
pub mod #mod_ty { | ||
#mod_items | ||
} | ||
pub mod #mod_ty | ||
}); | ||
|
||
let mod_group = Group::new(Delimiter::Brace, mod_items); | ||
out.extend(quote! { #mod_group }); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change needed? There's no Punct
used in the old code, and using literal {
}
inside quote!
should be fine, as long as they are properly nested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I forgot to revert this change while I was still working things out. I'll change it back.
The ci failure seems to be caused by this change in nightly rust: While the version of xtensa-lx-rt in use in CI, 0.9.0, is indeed quite old, the current version in git still contains naked functions with What's the best workaround? Pinning an older version of nightly in ci, for now? |
7daf9e0
to
0954530
Compare
Merge #865 changes in this PR, please. |
Uses `proc_macro2::Group` for token streams delimited with braces. Resolves: rust-embedded#863 Authored-by: rmsyn <[email protected]> Co-authored-by: Jan Niehusmann <[email protected]>
Workaround for incompatibility of latest nightly with `asm!` in naked functions.
0954530
to
fc33880
Compare
Uses
proc_macro2::Group
for token streams delimited with braces.Resolves: #863