Skip to content

Commit 09c895e

Browse files
authored
Merge pull request rust-lang#1 from golddranks/master
Reworded the rule about accessing public items.
2 parents e510c0c + 047df64 commit 09c895e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/visibility-and-privacy.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ pub enum State {
3939
With the notion of an item being either public or private, Rust allows item
4040
accesses in two cases:
4141

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

0 commit comments

Comments
 (0)