diff options
| author | bors <bors@rust-lang.org> | 2013-08-10 16:32:18 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-08-10 16:32:18 -0700 |
| commit | bf809768ee8ff3ea4ef434721ff82b09a4df261a (patch) | |
| tree | f7492e25ff06c4eeb3d1e480f641344b306c4247 /doc/tutorial.md | |
| parent | 8b9e1ce75a3e1416f2db80d30f65879fd902183f (diff) | |
| parent | 20953bb1fbfafc3839e739f38ddf7d495eb1fe8b (diff) | |
| download | rust-bf809768ee8ff3ea4ef434721ff82b09a4df261a.tar.gz rust-bf809768ee8ff3ea4ef434721ff82b09a4df261a.zip | |
auto merge of #8444 : erickt/rust/rollup, r=cmr
This merges these PR together: #8430: r=thestinger #8370: r=thestinger #8386: r=bstrie #8388: r=thestinger #8390: r=graydon #8394: r=graydon #8402: r=thestinger #8403: r=catamorphism
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(); ~~~ |
