Skip to content

Factor out pluralisation into syntax::errors - #64280

Merged
bors merged 4 commits into
rust-lang:masterfrom
V1shvesh:master
Sep 9, 2019
Merged

Factor out pluralisation into syntax::errors#64280
bors merged 4 commits into
rust-lang:masterfrom
V1shvesh:master

Conversation

@V1shvesh

Copy link
Copy Markdown
Contributor

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-highfiverust-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.

Comment threadsrc/librustc_errors/lib.rs Outdated
@Centril

Copy link
Copy Markdown
Contributor

Beautiful 👍 Let's land this.

r? @Centril@bors r+ rollup

@bors

bors commented Sep 8, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 7457ef8 has been approved by Centril

@rust-highfiverust-highfive assigned Centril and unassigned cramertjSep 8, 2019
@borsbors 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
Fixesrust-lang#64238.
@CentrilCentril mentioned this pull request Sep 8, 2019
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:masterSep 9, 2019
@V1shvesh

Copy link
Copy Markdown
ContributorAuthor

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
Fixesrust-lang#64238.
@CentrilCentril mentioned this pull request Sep 20, 2019
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
Fixesrust-lang#64238.
@CentrilCentril mentioned this pull request Sep 20, 2019
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
Fixesrust-lang#64238.
@tmandrytmandry mentioned this pull request Sep 20, 2019
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
Fixesrust-lang#64238.
@tmandrytmandry mentioned this pull request Sep 20, 2019
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
Fixesrust-lang#64238.
@tmandrytmandry mentioned this pull request Sep 20, 2019
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
Fixesrust-lang#64238.
@tmandrytmandry mentioned this pull request Sep 20, 2019
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
Fixesrust-lang#64238.
@tmandrytmandry mentioned this pull request Sep 21, 2019
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
Fixesrust-lang#64238.
@CentrilCentril mentioned this pull request Sep 21, 2019
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
Fixesrust-lang#64238.
@CentrilCentril mentioned this pull request Sep 21, 2019
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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: 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

@V1shvesh@rust-highfive@Centril@bors@cramertj