-
Notifications
You must be signed in to change notification settings - Fork 13.3k
factor out pluralisation remains after #64280 #64342
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
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. |
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.
@glorv: thanks for the pull request! Instead of adding another variant to the macro, I would instead use the original macro and refactor the methods that have a plural: bool
. E.g.
https://github.com/rust-lang/rust/blob/5608ea6277e6ab5421318068c47647a289d83d82/src/librustc_lint/unused.rs#L254
could pass len
instead of true
and then pluralise!
could be used as normal.
src/tools/compiletest/src/runtest.rs
Outdated
@@ -36,6 +36,8 @@ use log::*; | |||
use crate::extract_gdb_version; | |||
use crate::is_android_gdb_target; | |||
|
|||
use syntax::errors::pluralise; |
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.
You can't use syntax
here: I might just leave this one as is.
r? @varkor |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
18b7ef5
to
966fe50
Compare
Ping from triage, any updates? @varkor |
@glorv: sorry, I didn't notice that you had pushed new changes. I think you want to keep the macro definition as-is: you should just be passing an integer to it. You'll just need to do some refactoring around the locations where there's a boolean value. |
This comment has been minimized.
This comment has been minimized.
70c695a
to
20dc4e0
Compare
This comment has been minimized.
This comment has been minimized.
7dd1570
to
93d8eb0
Compare
This comment has been minimized.
This comment has been minimized.
📌 Commit 1ab5593 has been approved by |
there are two case that doesn't not match the original macro pattern at here and here as the provided param is already a bool or the check condition is not
x != 1
, so I change the macro accept a boolean expr instead of number to fit all the cases.@Centril please review
Fixes #64238.