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 97f3eee commit e9ae64cCopy full SHA for e9ae64c
src/librustc_error_codes/error_codes/E0599.md
@@ -9,3 +9,18 @@ let x = Mouth;
9
x.chocolate(); // error: no method named `chocolate` found for type `Mouth`
10
// in the current scope
11
```
12
+
13
+In this case, you need to implement the `chocolate` method to fix the error:
14
15
+```
16
+struct Mouth;
17
18
+impl Mouth {
19
+ fn chocolate(&self) { // We implement the `chocolate` method here.
20
+ println!("Hmmm! I love chocolate!");
21
+ }
22
+}
23
24
+let x = Mouth;
25
+x.chocolate(); // ok!
26
0 commit comments