about summary refs log tree commit diff
path: root/src/librustc_error_codes/error_codes
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustc_error_codes/error_codes')
-rw-r--r--src/librustc_error_codes/error_codes/E0599.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/librustc_error_codes/error_codes/E0599.md b/src/librustc_error_codes/error_codes/E0599.md
index c44e60571e1..5b1590b2999 100644
--- a/src/librustc_error_codes/error_codes/E0599.md
+++ b/src/librustc_error_codes/error_codes/E0599.md
@@ -9,3 +9,18 @@ let x = Mouth;
 x.chocolate(); // error: no method named `chocolate` found for type `Mouth`
                //        in the current scope
 ```
+
+In this case, you need to implement the `chocolate` method to fix the error:
+
+```
+struct Mouth;
+
+impl Mouth {
+    fn chocolate(&self) { // We implement the `chocolate` method here.
+        println!("Hmmm! I love chocolate!");
+    }
+}
+
+let x = Mouth;
+x.chocolate(); // ok!
+```