Skip to content

Commit 320c35e

Browse files
committed
auto merge of #16444 : steveklabnik/rust/fix_boxes_in_manual, r=brson
Fixes #16439
2 parents 32098bb + 5eb4e1a commit 320c35e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/doc/rust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1538,7 +1538,7 @@ Likewise, supertrait methods may also be called on trait objects.
15381538
# impl Shape for int { fn area(&self) -> f64 { 0.0 } }
15391539
# impl Circle for int { fn radius(&self) -> f64 { 0.0 } }
15401540
# let mycircle = 0;
1541-
let mycircle: Circle = ~mycircle as ~Circle;
1541+
let mycircle = box mycircle as Box<Circle>;
15421542
let nonsense = mycircle.radius() * mycircle.area();
15431543
~~~~
15441544

0 commit comments

Comments
 (0)