Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/items/use-declarations.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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:

Expand Down
Loading