From ac956c013f5064eadc14e581b833dfddd173a206 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Str=C3=A1nsk=C3=BD?= Date: Wed, 1 Oct 2014 22:20:58 +0200 Subject: [PATCH] Guide: clarify exporting Mention that using `pub` is called exporting. Remove that `use` is called re-exporting, because `pub use` should be called re-exporting. The guide currently doesn't cover `pub use`. --- src/doc/guide.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/doc/guide.md b/src/doc/guide.md index 074dfc17b0d..a00fa5668db 100644 --- a/src/doc/guide.md +++ b/src/doc/guide.md @@ -2727,7 +2727,8 @@ mod hello { } ``` -This will work: +Usage of the `pub` keyword is sometimes called 'exporting', because +we're making the function available for other modules. This will work: ```{notrust,ignore} $ cargo run @@ -3291,8 +3292,7 @@ use super::times_four; Because we've made a nested module, we can import functions from the parent module by using `super`. Sub-modules are allowed to 'see' private functions in -the parent. We sometimes call this usage of `use` a 're-export,' because we're -exporting the name again, somewhere else. +the parent. We've now covered the basics of testing. Rust's tools are primitive, but they work well in the simple cases. There are some Rustaceans working on building