-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Rewrite style.rs
using syn
#4220
base: main
Are you sure you want to change the base?
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @tgross35 (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
Huge thanks for working on this!! I’ll take a look in a couple of days :) |
61d9576
to
d54c31a
Compare
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.
Sorry that took a little longer than expected. Overall this looks great, most of the comments I left relate to things we can probably upgrade now since the original is from 2016.
One meta thing - maybe it's better to put this into a new module of libc-test/src/
and then only run it in libc-test/test
. Then you could add a new test file to check this implementation itself, just have a bunch of examples in strings and assert they pass/fail.
ed1c65d
to
822170d
Compare
I couldn't quite get it to work with |
Description
syn
instead of text-based parsing since it's more accurate and easier to work withstyle.rs
tolibc-test
and make it run as a part ofcargo test
, as well as cleaning it up a bit and adding tests for the style checker implementation itselfcfg_if!
macros, and tries to apply the same logic that the previousstyle.rs
script dids_macros
yet but it seems like it should be easier since we have access to the attributesCloses #4109
Sources
Checklist
libc-test/semver
have been updated*LAST
or*MAX
areincluded (see #3131)
cd libc-test && cargo test --target mytarget
);especially relevant for platforms that may not be checked in CI