Skip to content

Commit 5e02fd3

Browse files
committed
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.~~
2 parents 5695aea + 708c5d0 commit 5e02fd3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/doc/book/macros.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,8 @@ fn main() {
337337
}
338338
```
339339

340-
Instead you need to pass the variable name into the invocation, so it’s tagged
341-
with the right syntax context.
340+
Instead you need to pass the variable name into the invocation, so that it’s
341+
tagged with the right syntax context.
342342

343343
```rust
344344
macro_rules! foo {
@@ -470,7 +470,7 @@ which syntactic form it matches.
470470
* `ty`: a type. Examples: `i32`; `Vec<(char, String)>`; `&T`.
471471
* `pat`: a pattern. Examples: `Some(t)`; `(17, 'a')`; `_`.
472472
* `stmt`: a single statement. Example: `let x = 3`.
473-
* `block`: a brace-delimited sequence of statements. Example:
473+
* `block`: a brace-delimited sequence of statements and optionally an expression. Example:
474474
`{ log(error, "hi"); return 12; }`.
475475
* `item`: an [item][item]. Examples: `fn foo() { }`; `struct Bar;`.
476476
* `meta`: a "meta item", as found in attributes. Example: `cfg(target_os = "windows")`.

0 commit comments

Comments
 (0)