Skip to content

Commit f286775

Browse files
committed
Rollup merge of rust-lang#31863 - matklad:clarify-reference, r=steveklabnik
Reference implied that use declarations may appear *only* at the top of blocks and modules, but it is not the case, and the following is valid: ```Rust fn foo() { let x = 92; use baz::bar; } ``` r? @steveklabnik
2 parents 901eca9 + 397ab31 commit f286775

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/doc/reference.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -841,8 +841,8 @@ extern crate std as ruststd; // linking to 'std' under another name
841841

842842
A _use declaration_ creates one or more local name bindings synonymous with
843843
some other [path](#paths). Usually a `use` declaration is used to shorten the
844-
path required to refer to a module item. These declarations may appear at the
845-
top of [modules](#modules) and [blocks](grammar.html#block-expressions).
844+
path required to refer to a module item. These declarations may appear in
845+
[modules](#modules) and [blocks](grammar.html#block-expressions), usually at the top.
846846

847847
> **Note**: Unlike in many languages,
848848
> `use` declarations in Rust do *not* declare linkage dependency with external crates.

0 commit comments

Comments
 (0)