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

More accurate wording in the reference with regards to privacy #40134

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/doc/reference/src/visibility-and-privacy.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ pub enum State {
With the notion of an item being either public or private, Rust allows item
accesses in two cases:

1. If an item is public, then it can be used externally through any of its
public ancestors.
1. If an item is public, then it can be accessed externally from some module
`m` if you can access all the item's parent modules from `m`. You can
also potentially be able to name the item through re-exports. See below.
2. If an item is private, it may be accessed by the current module and its
descendants.

Expand Down