Skip to content

Commit 363d874

Browse files
committed
Improved wording with the privacy explanation.
1 parent 691eba1 commit 363d874

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/doc/reference/src/visibility-and-privacy.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ With the notion of an item being either public or private, Rust allows item
4040
accesses in two cases:
4141

4242
1. If an item is public, then it can be used externally through any of its
43-
public ancestors.
43+
accessible ancestors (either by anyone that has an access to an ancestor
44+
in the case of a chain of public ancestors,
45+
or by the siblings of a private ancestor, in the case of a chain of public
46+
ancestors terminating into a private ancestor).
4447
2. If an item is private, it may be accessed by the current module and its
4548
descendants.
4649

0 commit comments

Comments
 (0)