diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-09-07 08:06:11 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-07 08:06:11 +0200 |
| commit | d5caeac0964c0ce23e38e1bf75706fedbf1cd32c (patch) | |
| tree | 0ae5ee3328672bf878bc4dcd1f9d00776374948b /src/librustc | |
| parent | 84cb3529b627e8ae034237156c04bdad84ea8b61 (diff) | |
| parent | 0b97726e6c524d2cc0de4c2f5b1284eca010a7b2 (diff) | |
| download | rust-d5caeac0964c0ce23e38e1bf75706fedbf1cd32c.tar.gz rust-d5caeac0964c0ce23e38e1bf75706fedbf1cd32c.zip | |
Rollup merge of #64233 - varkor:correct-pluralisation, r=estebank
Correct pluralisation of various diagnostic messages
Diffstat (limited to 'src/librustc')
| -rw-r--r-- | src/librustc/ty/error.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/librustc/ty/error.rs b/src/librustc/ty/error.rs index fe8f94ab1d3..f67526ea4a1 100644 --- a/src/librustc/ty/error.rs +++ b/src/librustc/ty/error.rs @@ -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() + } None => "array".into(), } } |
