1 This error occurs when a method is used on a type which doesn't implement it:
3 Erroneous code example:
9 x.chocolate(); // error: no method named `chocolate` found for type `Mouth`
10 // in the current scope
13 In this case, you need to implement the `chocolate` method to fix the error:
19 fn chocolate(&self) { // We implement the `chocolate` method here.
20 println!("Hmmm! I love chocolate!");