We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 212256b + ca73fbf commit 0290caaCopy full SHA for 0290caa
src/librustc/middle/typeck/collect.rs
@@ -503,10 +503,11 @@ pub fn compare_impl_method(tcx: ty::ctxt,
503
if vec::len(impl_m.fty.sig.inputs) != vec::len(trait_m.fty.sig.inputs) {
504
tcx.sess.span_err(
505
cm.span,
506
- fmt!("method `%s` has %u parameters \
+ fmt!("method `%s` has %u parameter%s \
507
but the trait has %u",
508
*tcx.sess.str_of(trait_m.ident),
509
vec::len(impl_m.fty.sig.inputs),
510
+ if vec::len(impl_m.fty.sig.inputs) == 1 { "" } else { "s" },
511
vec::len(trait_m.fty.sig.inputs)));
512
return;
513
}
0 commit comments