1 An attempted implementation of a trait method has the wrong number of function
4 Erroneous code example:
8 fn foo(&self, x: u8) -> bool;
13 // error: method `foo` has 1 parameter but the declaration in trait `Foo::foo`
16 fn foo(&self) -> bool { true }
20 For example, the `Foo` trait has a method `foo` with two function parameters
21 (`&self` and `u8`), but the implementation of `foo` for the type `Bar` omits
22 the `u8` parameter. To fix this error, they must have the same parameters:
26 fn foo(&self, x: u8) -> bool;
32 fn foo(&self, x: u8) -> bool { // ok!