about summary refs log tree commit diff
path: root/src/doc/reference.md
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc/reference.md')
-rw-r--r--src/doc/reference.md6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/doc/reference.md b/src/doc/reference.md
index b3d5ad3b55d..cc90a69fd2a 100644
--- a/src/doc/reference.md
+++ b/src/doc/reference.md
@@ -1648,7 +1648,7 @@ specific type.
 Implementations are defined with the keyword `impl`.
 
 ```
-# #[derive(Copy)]
+# #[derive(Copy, Clone)]
 # struct Point {x: f64, y: f64};
 # type Surface = i32;
 # struct BoundingBox {x: f64, y: f64, width: f64, height: f64};
@@ -1661,6 +1661,10 @@ struct Circle {
 
 impl Copy for Circle {}
 
+impl Clone for Circle {
+    fn clone(&self) -> Circle { *self }
+}
+
 impl Shape for Circle {
     fn draw(&self, s: Surface) { do_draw_circle(s, *self); }
     fn bounding_box(&self) -> BoundingBox {