diff --git a/src/items/use-declarations.md b/src/items/use-declarations.md index 6de253a19..89542ce6a 100644 --- a/src/items/use-declarations.md +++ b/src/items/use-declarations.md @@ -66,15 +66,18 @@ cannot be resolved unambiguously, they represent a compile-time error. An example of re-exporting: ```rust -# fn main() { } mod quux { - pub use quux::foo::{bar, baz}; - + pub use self::foo::{bar, baz}; pub mod foo { - pub fn bar() { } - pub fn baz() { } + pub fn bar() {} + pub fn baz() {} } } + +fn main() { + quux::bar(); + quux::baz(); +} ``` In this example, the module `quux` re-exports two public names defined in