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

Correct pluralisation of various diagnostic messages #64233

Merged
merged 2 commits into from
Sep 7, 2019

Conversation

varkor
Copy link
Member

@varkor varkor commented Sep 6, 2019

No description provided.

@rust-highfive
Copy link
Collaborator

r? @eddyb

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 6, 2019
@varkor
Copy link
Member Author

varkor commented Sep 6, 2019

r? @estebank

@rust-highfive rust-highfive assigned estebank and unassigned eddyb Sep 6, 2019
@@ -200,7 +200,9 @@ impl<'tcx> ty::TyS<'tcx> {
ty::Array(_, n) => {
let n = tcx.lift_to_global(&n).unwrap();
match n.try_eval_usize(tcx, ty::ParamEnv::empty()) {
Some(n) => format!("array of {} elements", n).into(),
Some(n) => {
format!("array of {} element{}", n, if n != 1 { "s" } else { "" }).into()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This if $n != 1 { "s" } else { "" } business should be refactored to a function in some utility module in rustc_errors. Would be good to grep for "s" } else { "".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would make a nice beginner issue. I'll open one.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened #64238.

@estebank
Copy link
Contributor

estebank commented Sep 6, 2019

@bors r+ conditioned on following up on #64238.

@bors
Copy link
Contributor

bors commented Sep 6, 2019

📌 Commit 0b97726 has been approved by estebank

@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 6, 2019
Centril added a commit to Centril/rust that referenced this pull request Sep 7, 2019
…ebank

Correct pluralisation of various diagnostic messages
bors added a commit that referenced this pull request Sep 7, 2019
Rollup of 10 pull requests

Successful merges:

 - #63919 (Use hygiene for AST passes)
 - #63927 (Filter linkcheck spurious failure)
 - #64149 (rustc_codegen_llvm: give names to non-alloca variable values.)
 - #64192 (Bail out when encountering likely missing turbofish in parser)
 - #64231 (Move the HIR CFG to `rustc_ast_borrowck`)
 - #64233 (Correct pluralisation of various diagnostic messages)
 - #64236 (reduce visibility)
 - #64240 (Include compiler-rt in the source tarball)
 - #64241 ([doc] Added more prereqs and note about default directory)
 - #64243 (Move injection of attributes from command line to `libsyntax_ext`)

Failed merges:

r? @ghost
@bors bors merged commit 0b97726 into rust-lang:master Sep 7, 2019
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.

6 participants