Skip to content

Commit 86635e3

Browse files
authored
Merge pull request rust-lang#2295 from tshepang/patch-2
use-declarations.md: move example to where it's described
2 parents efec48e + 8eefbf3 commit 86635e3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/items/use-declarations.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,9 +330,6 @@ r[items.use.as-underscore]
330330
r[items.use.as-underscore.intro]
331331
Items can be imported without binding to a name by using an underscore with the form `use path as _`. This is particularly useful to import a trait so that its methods may be used without importing the trait's symbol, for example if the trait's symbol may conflict with another symbol. Another example is to link an external crate without importing its name.
332332

333-
r[items.use.as-underscore.glob]
334-
Asterisk glob imports will import items imported with `_` in their unnameable form.
335-
336333
```rust
337334
mod foo {
338335
pub trait Zoo {
@@ -351,6 +348,9 @@ fn main() {
351348
}
352349
```
353350

351+
r[items.use.as-underscore.glob]
352+
Asterisk glob imports will import items imported with `_` in their unnameable form.
353+
354354
r[items.use.as-underscore.macro]
355355
The unique, unnameable symbols are created after macro expansion so that macros may safely emit multiple references to `_` imports. For example, the following should not produce an error:
356356

0 commit comments

Comments
 (0)