Skip to content

Commit d2aa659

Browse files
authored
Merge pull request #806 from TeemuRemes/master
Replace incorrect term "parent modules" with "ancestor modules".
2 parents ed22e6f + f41afd4 commit d2aa659

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/visibility-and-privacy.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ With the notion of an item being either public or private, Rust allows item
4848
accesses in two cases:
4949

5050
1. If an item is public, then it can be accessed externally from some module
51-
`m` if you can access all the item's parent modules from `m`. You can
51+
`m` if you can access all the item's ancestor modules from `m`. You can
5252
also potentially be able to name the item through re-exports. See below.
5353
2. If an item is private, it may be accessed by the current module and its
5454
descendants.
@@ -148,7 +148,7 @@ In addition to public and private, Rust allows users to declare an item as
148148
visible only within a given scope. The rules for `pub` restrictions are as
149149
follows:
150150
- `pub(in path)` makes an item visible within the provided `path`. `path` must
151-
be a parent module of the item whose visibility is being declared.
151+
be an ancestor module of the item whose visibility is being declared.
152152
- `pub(crate)` makes an item visible within the current crate.
153153
- `pub(super)` makes an item visible to the parent module. This is equivalent
154154
to `pub(in super)`.

0 commit comments

Comments
 (0)