diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2016-02-25 04:21:11 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2016-02-25 04:21:11 +0530 |
| commit | f28677506c29507433ed2de4d7ad2b07c4cf0111 (patch) | |
| tree | 431aa13d91cd2af346e74db7abe30d63dde391c4 | |
| parent | 901eca9e6ce7a527e1014fda3301e6ddf1365096 (diff) | |
| parent | 397ab315e76d59f634b79aa2c694571ad0c3e000 (diff) | |
| download | rust-f28677506c29507433ed2de4d7ad2b07c4cf0111.tar.gz rust-f28677506c29507433ed2de4d7ad2b07c4cf0111.zip | |
Rollup merge of #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
| -rw-r--r-- | src/doc/reference.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/doc/reference.md b/src/doc/reference.md index 2fdc1be3e77..3dcc7b73480 100644 --- a/src/doc/reference.md +++ b/src/doc/reference.md @@ -841,8 +841,8 @@ extern crate std as ruststd; // linking to 'std' under another name A _use declaration_ creates one or more local name bindings synonymous with some other [path](#paths). Usually a `use` declaration is used to shorten the -path required to refer to a module item. These declarations may appear at the -top of [modules](#modules) and [blocks](grammar.html#block-expressions). +path required to refer to a module item. These declarations may appear in +[modules](#modules) and [blocks](grammar.html#block-expressions), usually at the top. > **Note**: Unlike in many languages, > `use` declarations in Rust do *not* declare linkage dependency with external crates. |
