diff --git a/src/doc/rust.md b/src/doc/rust.md index f9560b4a5096..f47b85b6388d 100644 --- a/src/doc/rust.md +++ b/src/doc/rust.md @@ -1538,7 +1538,7 @@ Likewise, supertrait methods may also be called on trait objects. # impl Shape for int { fn area(&self) -> f64 { 0.0 } } # impl Circle for int { fn radius(&self) -> f64 { 0.0 } } # let mycircle = 0; -let mycircle: Circle = ~mycircle as ~Circle; +let mycircle = box mycircle as Box; let nonsense = mycircle.radius() * mycircle.area(); ~~~~