Skip to content

Commit f3573aa

Browse files
committed
Auto merge of rust-lang#21609 - GarrettHeel:master, r=steveklabnik
Now that it's no longer feature gated, add docs for wildcard syntax.
2 parents 715f9a5 + 98c46c3 commit f3573aa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/doc/trpl/crates-and-modules.md

+4
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,10 @@ module, we now have a `phrases::japanese::hello()` function and a
551551
`phrases::japanese::farewells::goodbye()`. Our internal organization doesn't
552552
define our external interface.
553553
554+
Here we have a `pub use` for each function we want to bring into the
555+
`japanese` scope. We could alternatively use the wildcard syntax to include
556+
everything from `greetings` into the current scope: `pub use self::greetings::*`.
557+
554558
Also, note that we `pub use`d before we declared our `mod`s. Rust requires that
555559
`use` declarations go first.
556560

0 commit comments

Comments
 (0)