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

Factor out pluralisation into syntax::errors #64280

Merged
merged 4 commits into from
Sep 9, 2019
Merged

Factor out pluralisation into syntax::errors #64280

merged 4 commits into from
Sep 9, 2019

Conversation

V1shvesh
Copy link
Contributor

@V1shvesh V1shvesh commented Sep 8, 2019

Fixes #64238.

Adress issue #64238. Create a macro to be used for pluralisation check
throughout rustc codebase.
Modify files performing pluralisation checks to incorporate the
dedicated macro located in `syntax::errors`.
@rust-highfive

This comment has been minimized.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 8, 2019
@rust-highfive

This comment has been minimized.

src/librustc_errors/lib.rs Outdated Show resolved Hide resolved
@Centril
Copy link
Contributor

Centril commented Sep 8, 2019

Beautiful 👍 Let's land this.

r? @Centril @bors r+ rollup

@bors
Copy link
Contributor

bors commented Sep 8, 2019

📌 Commit 7457ef8 has been approved by Centril

@rust-highfive rust-highfive assigned Centril and unassigned cramertj Sep 8, 2019
@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 8, 2019
Centril added a commit to Centril/rust that referenced this pull request Sep 8, 2019
Factor out pluralisation into syntax::errors

Fixes rust-lang#64238.
bors added a commit that referenced this pull request Sep 8, 2019
Rollup of 4 pull requests

Successful merges:

 - #64078 (compiletest: disable -Aunused for run-pass tests)
 - #64263 (Replace "feature gated" wording with "unstable".)
 - #64280 (Factor out pluralisation into syntax::errors)
 - #64288 (use 'get_toml' instead of regular expression)

Failed merges:

r? @ghost
@bors bors merged commit 7457ef8 into rust-lang:master Sep 9, 2019
@V1shvesh
Copy link
Contributor Author

V1shvesh commented Sep 9, 2019

And there goes my first contribution towards Rust! The first of many, I hope... 😛

@Centril @varkor Thank you so much for the help! 😄

glorv pushed a commit to glorv/rust that referenced this pull request Sep 19, 2019
Centril added a commit to Centril/rust that referenced this pull request Sep 20, 2019
factor out pluralisation remains after rust-lang#64280

there are two case that doesn't not match the original macro pattern at [here](https://github.com/rust-lang/rust/blob/master/src/librustc_lint/unused.rs#L146) and [here](https://github.com/rust-lang/rust/blob/master/src/libsyntax/parse/diagnostics.rs#L539) 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 rust-lang#64238.
bors added a commit that referenced this pull request Sep 20, 2019
Rollup of 8 pull requests

Successful merges:

 - #64136 (Document From trait for LhsExpr in parser)
 - #64342 (factor out pluralisation remains after #64280)
 - #64387 (Fix redundant semicolon lint interaction with proc macro attributes)
 - #64498 (When possible point at argument causing item obligation failure)
 - #64615 (rustbuild: Turn down compression on exe installers)
 - #64617 (rustbuild: Turn down compression on msi installers)
 - #64618 (rustbuild: Improve output of `dist` step)
 - #64621 (Add Compatibility Notes to RELEASES.md for 1.38.0)

Failed merges:

r? @ghost
Centril added a commit to Centril/rust that referenced this pull request Sep 20, 2019
factor out pluralisation remains after rust-lang#64280

there are two case that doesn't not match the original macro pattern at [here](https://github.com/rust-lang/rust/blob/master/src/librustc_lint/unused.rs#L146) and [here](https://github.com/rust-lang/rust/blob/master/src/libsyntax/parse/diagnostics.rs#L539) 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 rust-lang#64238.
tmandry added a commit to tmandry/rust that referenced this pull request Sep 20, 2019
factor out pluralisation remains after rust-lang#64280

there are two case that doesn't not match the original macro pattern at [here](https://github.com/rust-lang/rust/blob/master/src/librustc_lint/unused.rs#L146) and [here](https://github.com/rust-lang/rust/blob/master/src/libsyntax/parse/diagnostics.rs#L539) 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 rust-lang#64238.
tmandry added a commit to tmandry/rust that referenced this pull request Sep 20, 2019
factor out pluralisation remains after rust-lang#64280

there are two case that doesn't not match the original macro pattern at [here](https://github.com/rust-lang/rust/blob/master/src/librustc_lint/unused.rs#L146) and [here](https://github.com/rust-lang/rust/blob/master/src/libsyntax/parse/diagnostics.rs#L539) 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 rust-lang#64238.
tmandry added a commit to tmandry/rust that referenced this pull request Sep 20, 2019
factor out pluralisation remains after rust-lang#64280

there are two case that doesn't not match the original macro pattern at [here](https://github.com/rust-lang/rust/blob/master/src/librustc_lint/unused.rs#L146) and [here](https://github.com/rust-lang/rust/blob/master/src/libsyntax/parse/diagnostics.rs#L539) 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 rust-lang#64238.
tmandry added a commit to tmandry/rust that referenced this pull request Sep 20, 2019
factor out pluralisation remains after rust-lang#64280

there are two case that doesn't not match the original macro pattern at [here](https://github.com/rust-lang/rust/blob/master/src/librustc_lint/unused.rs#L146) and [here](https://github.com/rust-lang/rust/blob/master/src/libsyntax/parse/diagnostics.rs#L539) 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 rust-lang#64238.
tmandry added a commit to tmandry/rust that referenced this pull request Sep 21, 2019
factor out pluralisation remains after rust-lang#64280

there are two case that doesn't not match the original macro pattern at [here](https://github.com/rust-lang/rust/blob/master/src/librustc_lint/unused.rs#L146) and [here](https://github.com/rust-lang/rust/blob/master/src/libsyntax/parse/diagnostics.rs#L539) 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 rust-lang#64238.
Centril added a commit to Centril/rust that referenced this pull request Sep 21, 2019
factor out pluralisation remains after rust-lang#64280

there are two case that doesn't not match the original macro pattern at [here](https://github.com/rust-lang/rust/blob/master/src/librustc_lint/unused.rs#L146) and [here](https://github.com/rust-lang/rust/blob/master/src/libsyntax/parse/diagnostics.rs#L539) 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 rust-lang#64238.
Centril added a commit to Centril/rust that referenced this pull request Sep 21, 2019
factor out pluralisation remains after rust-lang#64280

there are two case that doesn't not match the original macro pattern at [here](https://github.com/rust-lang/rust/blob/master/src/librustc_lint/unused.rs#L146) and [here](https://github.com/rust-lang/rust/blob/master/src/libsyntax/parse/diagnostics.rs#L539) 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 rust-lang#64238.
bors added a commit that referenced this pull request Sep 21, 2019
Rollup of 9 pull requests

Successful merges:

 - #64010 (Stabilize `param_attrs` in Rust 1.39.0)
 - #64136 (Document From trait for LhsExpr in parser)
 - #64342 (factor out pluralisation remains after #64280)
 - #64347 (Add long error explanation for E0312)
 - #64621 (Add Compatibility Notes to RELEASES.md for 1.38.0)
 - #64632 (remove the extra comma after the match arm)
 - #64640 (No home directory on vxWorks)
 - #64641 (Exempt extern "Rust" from improper_ctypes)
 - #64642 (Fix the span used to suggest avoiding for-loop moves)

Failed merges:

r? @ghost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Factor out pluralisation checks in diagnostics
5 participants