From 84761dcdfcc766b34cd0bf2847a0f559078c584d Mon Sep 17 00:00:00 2001 From: Teemu Remes Date: Fri, 1 May 2020 21:03:25 +0300 Subject: [PATCH 1/2] Replace incorrect term "parent modules" with "ancestor modules". "Parent" means the first level above, "ancestors" means all the levels above. --- src/visibility-and-privacy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/visibility-and-privacy.md b/src/visibility-and-privacy.md index d93d32ef1..66865c74a 100644 --- a/src/visibility-and-privacy.md +++ b/src/visibility-and-privacy.md @@ -48,7 +48,7 @@ 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 accessed externally from some module - `m` if you can access all the item's parent modules from `m`. You can + `m` if you can access all the item's ancestor 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. From f41afd4f69a7996ac66b01f75e333bccf43337f7 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Sat, 2 May 2020 08:46:13 -0700 Subject: [PATCH 2/2] Update another usage of "parent" to "ancestor" --- src/visibility-and-privacy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/visibility-and-privacy.md b/src/visibility-and-privacy.md index 66865c74a..84bb4fb86 100644 --- a/src/visibility-and-privacy.md +++ b/src/visibility-and-privacy.md @@ -148,7 +148,7 @@ In addition to public and private, Rust allows users to declare an item as visible only within a given scope. The rules for `pub` restrictions are as follows: - `pub(in path)` makes an item visible within the provided `path`. `path` must -be a parent module of the item whose visibility is being declared. +be an ancestor module of the item whose visibility is being declared. - `pub(crate)` makes an item visible within the current crate. - `pub(super)` makes an item visible to the parent module. This is equivalent to `pub(in super)`.