From 8eefbf3a25b846012e3123491c0cbf39ae9f22d8 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Wed, 24 Jun 2026 15:58:00 +0200 Subject: [PATCH] use-declarations.md: move example to where it's described The example being under `.glob` rule made me expect it to demonstrate the glob rule --- src/items/use-declarations.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/items/use-declarations.md b/src/items/use-declarations.md index 49781895c8..855f27ba85 100644 --- a/src/items/use-declarations.md +++ b/src/items/use-declarations.md @@ -330,9 +330,6 @@ r[items.use.as-underscore] r[items.use.as-underscore.intro] 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. -r[items.use.as-underscore.glob] -Asterisk glob imports will import items imported with `_` in their unnameable form. - ```rust mod foo { pub trait Zoo { @@ -351,6 +348,9 @@ fn main() { } ``` +r[items.use.as-underscore.glob] +Asterisk glob imports will import items imported with `_` in their unnameable form. + r[items.use.as-underscore.macro] 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: