Skip to content

Commit

Permalink
Unhide some code from the Traits section
Browse files Browse the repository at this point in the history
Having this code section hidden is misleading because it makes it look like implementing Circle for Foo automatically makes Foo implement Shape.
  • Loading branch information
Seeker14491 committed Oct 13, 2015
1 parent ec4362d commit 12224be
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/doc/reference.md
Expand Up @@ -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());
Expand Down

0 comments on commit 12224be

Please sign in to comment.