Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusion about rooting in Borrowed Pointers Tutorial. #9596

Closed
nejucomo opened this issue Sep 28, 2013 · 2 comments
Closed

Confusion about rooting in Borrowed Pointers Tutorial. #9596

nejucomo opened this issue Sep 28, 2013 · 2 comments

Comments

@nejucomo
Copy link

Section 5 Borrowing managed boxes and rooting of the Borrowed Pointers tutorial says:

"A heap box that is unrooted is one such that no pointer values in the heap point to it."

Shouldn't this say:

"A heap box is unrooted if there are no owning (non-borrowed) pointers to it."

?

In the following example, isn't the Point rooted, even though there are "no pointer values in the heap" pointing to it?

fn f() {
  let p = @Point { x: 42, y: 23 };
  let y = &p.x
  // ...
}
@pnkfelix
Copy link
Member

part of #11755

@steveklabnik
Copy link
Member

This whole section is gone, since managed boxes are. It can be closed.

flip1995 pushed a commit to flip1995/rust that referenced this issue Oct 6, 2022
Rustup

r? `@ghost`

changelog: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants