diff options
| author | Seeker14491 <seeker14491@gmail.com> | 2015-10-13 13:45:10 -0500 |
|---|---|---|
| committer | Seeker14491 <seeker14491@gmail.com> | 2015-10-13 13:45:10 -0500 |
| commit | 12224bec21c486165b973bc8996f230bde6e78fb (patch) | |
| tree | ff1d990ea514ba4ec81047b28c0d3d50181fecd5 | |
| parent | ec4362da562a4b591a7d120c6677e14ea713481a (diff) | |
| download | rust-12224bec21c486165b973bc8996f230bde6e78fb.tar.gz rust-12224bec21c486165b973bc8996f230bde6e78fb.zip | |
Unhide some code from the Traits section
Having this code section hidden is misleading because it makes it look like implementing Circle for Foo automatically makes Foo implement Shape.
| -rw-r--r-- | src/doc/reference.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/doc/reference.md b/src/doc/reference.md index 9ce191ee589..917ade83735 100644 --- a/src/doc/reference.md +++ b/src/doc/reference.md @@ -1435,11 +1435,11 @@ struct Foo; trait Shape { fn area(&self) -> f64; } trait Circle : Shape { fn radius(&self) -> f64; } -# impl Shape for Foo { -# fn area(&self) -> f64 { -# 0.0 -# } -# } +impl Shape for Foo { + fn area(&self) -> f64 { + 0.0 + } +} impl Circle for Foo { fn radius(&self) -> f64 { println!("calling area: {}", self.area()); |
