GitHub PullRequestReviewCommentEvent at 2014-05-24 17:19:21
Repository: rust
Actor: cmr
Payload: {"comment":{"url":"https://api.github.com/repos/mozilla/rust/pulls/comments/13027169","id":13027169,"diff_hunk":"@@ -167,109 +156,29 @@ operator. For example, I could write:\n # struct Size {w: f64, h: f64} // as before\n # struct Rectangle {origin: Point, size: Size}\n # let rect_stack  = &Rectangle {origin: Point {x: 1.0, y: 2.0}, size: Size {w: 3.0, h: 4.0}};\n-# let rect_managed = @Rectangle {origin: Point {x: 3.0, y: 4.0}, size: Size {w: 3.0, h: 4.0}};\n-# let rect_owned = box Rectangle {origin: Point {x: 5.0, y: 6.0}, size: Size {w: 3.0, h: 4.0}};\n+# let rect_heap   = box Rectangle {origin: Point {x: 5.0, y: 6.0}, size: Size {w: 3.0, h: 4.0}};\n # fn compute_distance(p1: &Point, p2: &Point) -> f64 { 0.0 }\n-compute_distance(&rect_stack.origin, &rect_managed.origin);\n+compute_distance(&rect_stack.origin, &rect_heap.origin);\n ~~~\n \n which would borrow the field `origin` from the rectangle on the stack\n-as well as from the managed box, and then compute the distance between them.\n+as well as from the owned box, and then compute the distance between them.\n \n-# Borrowing managed boxes and rooting\n+# Lifetimes\n \n-We’ve seen a few examples so far of borrowing heap boxes, both managed\n-and owned. Up till this point, we’ve glossed over issues of\n-safety. As stated in the introduction, at runtime a reference\n-is simply a pointer, nothing more. Therefore, avoiding C's problems\n-with dangling pointers requires a compile-time safety check.\n+We’ve seen a few examples of borrowing data. Up till this point, we’ve glossed\n+over issues of safety. As stated in the introduction, at runtime a reference\n+is simply a pointer, nothing more. Therefore, avoiding C's problems with\n+dangling pointers requires a compile-time safety check.\n \n-The basis for the check is the notion of _lifetimes_. A lifetime is a\n+The basis for the check is the notion of __lifetimes__. A lifetime is a","path":"src/doc/guide-lifetimes.md","position":161,"original_position":161,"commit_id":"64dad2cb0333e12d0e5b4bb4e9b013af68f14156","original_commit_id":"64dad2cb0333e12d0e5b4bb4e9b013af68f14156","user":{"login":"cmr","id":704250,"avatar_url":"https://avatars.githubusercontent.com/u/704250?","gravatar_id":"f012fce9f997ceefa53283631d45de0d","url":"https://api.github.com/users/cmr","html_url":"https://github.com/cmr","followers_url":"https://api.github.com/users/cmr/followers","following_url":"https://api.github.com/users/cmr/following{/other_user}","gists_url":"https://api.github.com/users/cmr/gists{/gist_id}","starred_url":"https://api.github.com/users/cmr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmr/subscriptions","organizations_url":"https://api.github.com/users/cmr/orgs","repos_url":"https://api.github.com/users/cmr/repos","events_url":"https://api.github.com/users/cmr/events{/privacy}","received_events_url":"https://api.github.com/users/cmr/received_events","type":"User","site_admin":false},"body":"Please keep the italics, rather than bolding it.","created_at":"2014-05-24T17:19:21Z","updated_at":"2014-05-24T17:19:21Z","html_url":"https://github.com/mozilla/rust/pull/14387#discussion_r13027169","pull_request_url":"https://api.github.com/repos/mozilla/rust/pulls/14387","_links":{"self":{"href":"https://api.github.com/repos/mozilla/rust/pulls/comments/13027169"},"html":{"href":"https://github.com/mozilla/rust/pull/14387#discussion_r13027169"},"pull_request":{"href":"https://api.github.com/repos/mozilla/rust/pulls/14387"}}}}