Skip to content

Commit 0290caa

Browse files
committed
auto merge of #6026 : isanbard/rust/ca73fbf72615575f106ee18160580711aca89d85, r=catamorphism
When the number of parameters is 1, then 'parameter' should remain singular. Otherwise pluralize it.
2 parents 212256b + ca73fbf commit 0290caa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustc/middle/typeck/collect.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,10 +503,11 @@ pub fn compare_impl_method(tcx: ty::ctxt,
503503
if vec::len(impl_m.fty.sig.inputs) != vec::len(trait_m.fty.sig.inputs) {
504504
tcx.sess.span_err(
505505
cm.span,
506-
fmt!("method `%s` has %u parameters \
506+
fmt!("method `%s` has %u parameter%s \
507507
but the trait has %u",
508508
*tcx.sess.str_of(trait_m.ident),
509509
vec::len(impl_m.fty.sig.inputs),
510+
if vec::len(impl_m.fty.sig.inputs) == 1 { "" } else { "s" },
510511
vec::len(trait_m.fty.sig.inputs)));
511512
return;
512513
}

0 commit comments

Comments
 (0)