diff options
| author | varkor <github@varkor.com> | 2019-09-06 19:21:20 +0100 |
|---|---|---|
| committer | varkor <github@varkor.com> | 2019-09-06 19:21:20 +0100 |
| commit | f6481ed1c31d2a3c43fab73e58901f7c25360fcb (patch) | |
| tree | 734024c70db95eceafedd99b2011bb05b777bee7 /src/librustc | |
| parent | 4894123d21ed4b153a2e5c32c0870cb2d97f9b46 (diff) | |
| download | rust-f6481ed1c31d2a3c43fab73e58901f7c25360fcb.tar.gz rust-f6481ed1c31d2a3c43fab73e58901f7c25360fcb.zip | |
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(), } } |
