diff options
| author | Stephen (Ziyun) Li <stephen.liziyun@gmail.com> | 2016-01-17 14:56:23 -0500 |
|---|---|---|
| committer | Stephen (Ziyun) Li <stephen.liziyun@gmail.com> | 2016-01-17 14:56:23 -0500 |
| commit | 8a829704cb28544dd13c3de831cf822da17e5bf0 (patch) | |
| tree | acca3f0cd454939d422f7f0922d8fad620d4c746 | |
| parent | bff52927f582e2ca8dea799bd58f06e654295e21 (diff) | |
| download | rust-8a829704cb28544dd13c3de831cf822da17e5bf0.tar.gz rust-8a829704cb28544dd13c3de831cf822da17e5bf0.zip | |
Fix C macro example
| -rw-r--r-- | src/doc/book/macros.md | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/doc/book/macros.md b/src/doc/book/macros.md index 7c8b74bd649..f5a0cd5e2c6 100644 --- a/src/doc/book/macros.md +++ b/src/doc/book/macros.md @@ -285,9 +285,11 @@ This expands to ```text const char *state = "reticulating splines"; -int state = get_log_state(); -if (state > 0) { - printf("log(%d): %s\n", state, state); +{ + int state = get_log_state(); + if (state > 0) { + printf("log(%d): %s\n", state, state); + } } ``` |
