about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2016-03-28 13:48:29 -0400
committerSteve Klabnik <steve@steveklabnik.com>2016-03-28 13:48:29 -0400
commit5e02fd3727dcfec37ef4addafd490c8d9b89b705 (patch)
tree4e6820377ad4f4b9610ac7419d07d71246b1bd09 /src
parent5695aea473477919916116a678da93217b76496a (diff)
parent708c5d09d7a355c506960581e16306c96eb7d019 (diff)
downloadrust-5e02fd3727dcfec37ef4addafd490c8d9b89b705.tar.gz
rust-5e02fd3727dcfec37ef4addafd490c8d9b89b705.zip
Rollup merge of #32509 - tclfs:patch-2, r=steveklabnik
docs: make some text changes on Section `Macros`

(1) In contrast to `that`, `so that` expresses `result` indicated by the sentence, not `reason`;
(2) `block` is an expression, and may be have an expression, so I add `optionally an expression` to make more precise;
~~(3) When I read here, I was confused with what `the child` referred to. After modification, it would be better.~~
Diffstat (limited to 'src')
-rw-r--r--src/doc/book/macros.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/doc/book/macros.md b/src/doc/book/macros.md
index 188abb316ab..c16e2ea4535 100644
--- a/src/doc/book/macros.md
+++ b/src/doc/book/macros.md
@@ -337,8 +337,8 @@ fn main() {
 }
 ```
 
-Instead you need to pass the variable name into the invocation, so it’s tagged
-with the right syntax context.
+Instead you need to pass the variable name into the invocation, so that it’s
+tagged with the right syntax context.
 
 ```rust
 macro_rules! foo {
@@ -470,7 +470,7 @@ which syntactic form it matches.
 * `ty`: a type. Examples: `i32`; `Vec<(char, String)>`; `&T`.
 * `pat`: a pattern. Examples: `Some(t)`; `(17, 'a')`; `_`.
 * `stmt`: a single statement. Example: `let x = 3`.
-* `block`: a brace-delimited sequence of statements. Example:
+* `block`: a brace-delimited sequence of statements and optionally an expression. Example:
   `{ log(error, "hi"); return 12; }`.
 * `item`: an [item][item]. Examples: `fn foo() { }`; `struct Bar;`.
 * `meta`: a "meta item", as found in attributes. Example: `cfg(target_os = "windows")`.