diff options
Diffstat (limited to 'doc/tutorial.md')
| -rw-r--r-- | doc/tutorial.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/tutorial.md b/doc/tutorial.md index 40e276ae04a..f4264b0d5af 100644 --- a/doc/tutorial.md +++ b/doc/tutorial.md @@ -1305,7 +1305,7 @@ match crayons[0] { A vector can be destructured using pattern matching: ~~~~ -let numbers: [int, ..3] = [1, 2, 3]; +let numbers: &[int] = &[1, 2, 3]; let score = match numbers { [] => 0, [a] => a * 10, @@ -2195,7 +2195,7 @@ use std::float::consts::pi; # impl Shape for CircleStruct { fn area(&self) -> float { pi * square(self.radius) } } let concrete = @CircleStruct{center:Point{x:3f,y:4f},radius:5f}; -let mycircle: Circle = concrete as @Circle; +let mycircle: @Circle = concrete as @Circle; let nonsense = mycircle.radius() * mycircle.area(); ~~~ |
