-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Allow a trailing comma in lint_array #47458
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @estebank (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
r? @durka |
src/librustc/lint/mod.rs
Outdated
} | ||
) } | ||
macro_rules! lint_array { | ||
($( $lint:expr ),*,) => { lint_array!( $( &$lint ),* ) }; |
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.
Why did you add a &
here?
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.
Oh, good catch... Copy/paste 🤕
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.
Fixed. Thanks @durka !
LGTM, I'm not a reviewer though. You should probably add a test for the trailing comma? Perhaps in |
Thanks, I added a couple of tests... |
Hmm... ok... I need to fix a couple of errors. |
Ok, I think they should actually work now |
@estebank ping :) |
@mark-i-m one final nitpick and r=me. Could you squash all your commits into one? |
091055d
to
f81c2de
Compare
@estebank Squashed :) Thanks! |
@bors r+ rollup |
📌 Commit f81c2de has been approved by |
Allow a trailing comma in lint_array fix rust-lang#47428
Allow a trailing comma in lint_array fix rust-lang#47428
fix #47428