Skip to content

Commit 492dd04

Browse files
committed
Merge pull request #19994 from bluss/doc-ownership
doc: Small changes to ownership guide. Reviewed-by: steveklabnik
2 parents 41e11d1 + 5806519 commit 492dd04

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/doc/guide-ownership.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ fn main() {
324324
let f = Foo { x: y }; // -+ f goes into scope
325325
// stuff // |
326326
// |
327-
} // -+ f & y go out of scope
327+
} // -+ f and y go out of scope
328328
```
329329

330330
Our `f` lives within the scope of `y`, so everything works. What if it didn't?
@@ -342,7 +342,7 @@ fn main() {
342342
let y = &5i; // ---+ y goes into scope
343343
let f = Foo { x: y }; // ---+ f goes into scope
344344
x = &f.x; // | | error here
345-
} // ---+ f & y go out of scope
345+
} // ---+ f and y go out of scope
346346
// |
347347
println!("{}", x); // |
348348
} // -+ x goes out of scope
@@ -395,7 +395,7 @@ struct Wheel {
395395
}
396396
397397
fn main() {
398-
let car = Car { name: "DeLorian".to_string() };
398+
let car = Car { name: "DeLorean".to_string() };
399399
400400
for _ in range(0u, 4) {
401401
Wheel { size: 360, owner: car };
@@ -431,7 +431,7 @@ struct Wheel {
431431
}
432432

433433
fn main() {
434-
let car = Car { name: "DeLorian".to_string() };
434+
let car = Car { name: "DeLorean".to_string() };
435435

436436
let car_owner = Rc::new(car);
437437

0 commit comments

Comments
 (0)