From 432011d1437ce046c25dde8a4db67dac63c19ed0 Mon Sep 17 00:00:00 2001 From: Nick Cameron Date: Mon, 16 Mar 2015 09:00:41 +1300 Subject: Fallout in testing. --- src/doc/reference.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/doc/reference.md') diff --git a/src/doc/reference.md b/src/doc/reference.md index c4c122463a7..3fae49bfc6d 100644 --- a/src/doc/reference.md +++ b/src/doc/reference.md @@ -1961,16 +1961,18 @@ module through the rules above. It essentially allows public access into the re-exported item. For example, this program is valid: ``` -pub use self::implementation as api; +pub use self::implementation::api; mod implementation { - pub fn f() {} + pub mod api { + pub fn f() {} + } } # fn main() {} ``` -This means that any external crate referencing `implementation::f` would +This means that any external crate referencing `implementation::api::f` would receive a privacy violation, while the path `api::f` would be allowed. When re-exporting a private item, it can be thought of as allowing the "privacy -- cgit 1.4.1-3-g733a5