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.
1 parent 5f13e9c commit ca73fbfCopy full SHA for ca73fbf
src/librustc/middle/typeck/collect.rs
@@ -403,10 +403,11 @@ pub fn compare_impl_method(tcx: ty::ctxt,
403
if vec::len(impl_m.fty.sig.inputs) != vec::len(trait_m.fty.sig.inputs) {
404
tcx.sess.span_err(
405
cm.span,
406
- fmt!("method `%s` has %u parameters \
+ fmt!("method `%s` has %u parameter%s \
407
but the trait has %u",
408
*tcx.sess.str_of(trait_m.ident),
409
vec::len(impl_m.fty.sig.inputs),
410
+ if vec::len(impl_m.fty.sig.inputs) == 1 { "" } else { "s" },
411
vec::len(trait_m.fty.sig.inputs)));
412
return;
413
}
0 commit comments