correct error message and add to test
This commit is contained in:
parent
3a2f1e1876
commit
520c3f5f79
@ -621,7 +621,7 @@ fn compare_impl_method(tcx: ty::ctxt, sp: span, impl_m: ty::method,
|
||||
"` has an incompatible set of type parameters");
|
||||
ty::mk_fn(tcx, impl_m.fty)
|
||||
} else if vec::len(impl_m.fty.inputs) != vec::len(if_m.fty.inputs) {
|
||||
tcx.sess.span_err(sp,#fmt["method `%s`` has %u parameters \
|
||||
tcx.sess.span_err(sp,#fmt["method `%s` has %u parameters \
|
||||
but the iface has %u",
|
||||
if_m.ident,
|
||||
vec::len(impl_m.fty.inputs),
|
||||
|
@ -3,6 +3,7 @@ iface foo {
|
||||
}
|
||||
impl of foo for int {
|
||||
fn bar() -> int {
|
||||
//!^ ERROR method `bar` has 0 parameters but the iface has 1
|
||||
self
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user