Skip to content

Commit 570756f

Browse files
committed
Rollup merge of rust-lang#29028 - Seeker14491:patch-1, r=Manishearth
Having this code section hidden is misleading because it makes it look like implementing Circle for Foo automatically makes Foo implement Shape.
2 parents 3002662 + 12224be commit 570756f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/doc/reference.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1435,11 +1435,11 @@ struct Foo;
14351435

14361436
trait Shape { fn area(&self) -> f64; }
14371437
trait Circle : Shape { fn radius(&self) -> f64; }
1438-
# impl Shape for Foo {
1439-
# fn area(&self) -> f64 {
1440-
# 0.0
1441-
# }
1442-
# }
1438+
impl Shape for Foo {
1439+
fn area(&self) -> f64 {
1440+
0.0
1441+
}
1442+
}
14431443
impl Circle for Foo {
14441444
fn radius(&self) -> f64 {
14451445
println!("calling area: {}", self.area());

0 commit comments

Comments
 (0)