Grammar improvements of #731

Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
This commit is contained in:
Tomas Tomecek 2017-06-01 15:07:37 +02:00
parent 87f8cf151e
commit 9acf423e67
1 changed files with 5 additions and 5 deletions

View File

@ -503,9 +503,9 @@ Definition and expansion of macros both happen in a single depth-first,
lexical-order traversal of a crates source. So a macro defined at module scope lexical-order traversal of a crates source. So a macro defined at module scope
is visible to any subsequent code in the same module, which includes the body is visible to any subsequent code in the same module, which includes the body
of any subsequent child `mod` items. If you want to use your macro, which is of any subsequent child `mod` items. If you want to use your macro, which is
defined in a different module, you need to use `macro_use` attribute **before** defined in a different module, you need to use `macro_use` attribute *before*
using the macro. Let's say we'll have our macros defined in module `macros` and using the macro. Let's say our macros are defined in module `macros` and we
we would like to use them inside module `client`. This is the required module would like to use them inside module `client`. This is the required module
definition order: definition order:
```rust ```rust
@ -514,7 +514,7 @@ mod macros;
mod client; mod client;
``` ```
Opposite order would resulted in a compilation failure: The opposite order would result in a compilation failure:
```rust ```rust
mod client; mod client;
@ -522,7 +522,7 @@ mod client;
mod macros; mod macros;
``` ```
```shell ```bash
error: cannot find macro `my_macro!` in this scope error: cannot find macro `my_macro!` in this scope
``` ```