Skip to content

Confusion about rooting in Borrowed Pointers Tutorial. #9596

@nejucomo

Description

@nejucomo

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
  // ...
}

Activity

pnkfelix

pnkfelix commented on Jan 23, 2014

@pnkfelix
Contributor

part of #11755

steveklabnik

steveklabnik commented on Jun 23, 2014

@steveklabnik
Contributor

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

added a commit that references this issue on Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @steveklabnik@alexcrichton@pnkfelix@nejucomo

        Issue actions

          Confusion about rooting in Borrowed Pointers Tutorial. · Issue #9596 · rust-lang/rust