auto merge of #6026 : isanbard/rust/ca73fbf72615575f106ee18160580711aca89d85, r=catamorphism
When the number of parameters is 1, then 'parameter' should remain singular. Otherwise pluralize it.
This commit is contained in:
commit
0290caa885
@ -503,10 +503,11 @@ pub fn compare_impl_method(tcx: ty::ctxt,
|
|||||||
if vec::len(impl_m.fty.sig.inputs) != vec::len(trait_m.fty.sig.inputs) {
|
if vec::len(impl_m.fty.sig.inputs) != vec::len(trait_m.fty.sig.inputs) {
|
||||||
tcx.sess.span_err(
|
tcx.sess.span_err(
|
||||||
cm.span,
|
cm.span,
|
||||||
fmt!("method `%s` has %u parameters \
|
fmt!("method `%s` has %u parameter%s \
|
||||||
but the trait has %u",
|
but the trait has %u",
|
||||||
*tcx.sess.str_of(trait_m.ident),
|
*tcx.sess.str_of(trait_m.ident),
|
||||||
vec::len(impl_m.fty.sig.inputs),
|
vec::len(impl_m.fty.sig.inputs),
|
||||||
|
if vec::len(impl_m.fty.sig.inputs) == 1 { "" } else { "s" },
|
||||||
vec::len(trait_m.fty.sig.inputs)));
|
vec::len(trait_m.fty.sig.inputs)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user