diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-12-21 00:04:08 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-12-21 09:27:33 -0800 |
| commit | 7e2ed4adc16d0671b70cceea037440eb14a5bbea (patch) | |
| tree | d4cd7d0697e9789a31996af151007afdae6b1cca | |
| parent | 91b3232764de887d4036b305e53f452c5a3d3de8 (diff) | |
| parent | 5806519bd49e1ebcd78ee5370bd6c9ffad236577 (diff) | |
| download | rust-7e2ed4adc16d0671b70cceea037440eb14a5bbea.tar.gz rust-7e2ed4adc16d0671b70cceea037440eb14a5bbea.zip | |
rollup merge of #19994: bluss/doc-ownership
Disambiguate maximally by using 'and' instead of '&' next to discussion about references. As a bonus, fix the spelling of the car too.
| -rw-r--r-- | src/doc/guide-ownership.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/doc/guide-ownership.md b/src/doc/guide-ownership.md index 1a469704143..bf750ecaa8f 100644 --- a/src/doc/guide-ownership.md +++ b/src/doc/guide-ownership.md @@ -324,7 +324,7 @@ fn main() { let f = Foo { x: y }; // -+ f goes into scope // stuff // | // | -} // -+ f & y go out of scope +} // -+ f and y go out of scope ``` Our `f` lives within the scope of `y`, so everything works. What if it didn't? @@ -342,7 +342,7 @@ fn main() { let y = &5i; // ---+ y goes into scope let f = Foo { x: y }; // ---+ f goes into scope x = &f.x; // | | error here - } // ---+ f & y go out of scope + } // ---+ f and y go out of scope // | println!("{}", x); // | } // -+ x goes out of scope @@ -395,7 +395,7 @@ struct Wheel { } fn main() { - let car = Car { name: "DeLorian".to_string() }; + let car = Car { name: "DeLorean".to_string() }; for _ in range(0u, 4) { Wheel { size: 360, owner: car }; @@ -431,7 +431,7 @@ struct Wheel { } fn main() { - let car = Car { name: "DeLorian".to_string() }; + let car = Car { name: "DeLorean".to_string() }; let car_owner = Rc::new(car); |
