about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorPanashe M. Fundira <fundirap@gmail.com>2016-08-22 12:10:02 -0400
committerPanashe M. Fundira <fundirap@gmail.com>2016-08-22 12:10:02 -0400
commit3da5f9327a3a54a280a299fd38ff8376d3d5d419 (patch)
treef718571cb6c0b570f4ba70bf36185ba2d7bad6e0 /src
parenta5a5c1074e67a5c12157eb88b7a4f055c8938108 (diff)
downloadrust-3da5f9327a3a54a280a299fd38ff8376d3d5d419.tar.gz
rust-3da5f9327a3a54a280a299fd38ff8376d3d5d419.zip
Correct failing book test
Diffstat (limited to 'src')
-rw-r--r--src/doc/book/traits.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/doc/book/traits.md b/src/doc/book/traits.md
index 164a851edef..9cbb514e280 100644
--- a/src/doc/book/traits.md
+++ b/src/doc/book/traits.md
@@ -52,6 +52,12 @@ implementing this trait passed as a parameter. `Self`, `&Self` or `&mut Self`
 may be used depending on the level of ownership required.
 
 ```rust
+struct Circle {
+    x: f64,
+    y: f64,
+    radius: f64,
+}
+
 trait HasArea {
     fn area(&self) -> f64;