File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5
- refs/heads/try: 03d9d6287ba09bbfb7c0dfe8977e6629ea5066e1
5
+ refs/heads/try: 55e29ef4aa88d5d16b2ac6880cf1ab39ae11de90
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
Original file line number Diff line number Diff line change @@ -729,7 +729,8 @@ top-level module will be called `foo`, and you can set `RUST_LOG` to
729
729
` foo ` to enable ` warn ` , ` info ` and ` debug ` logging for the module.
730
730
731
731
Turned-off ` log ` statements impose minimal overhead on the code that
732
- contains them, so except in code that needs to be really, really fast,
732
+ contains them, because the arguments to ` log ` are evaluated lazily.
733
+ So except in code that needs to be really, really fast,
733
734
you should feel free to scatter around debug logging statements, and
734
735
leave them in.
735
736
@@ -743,6 +744,9 @@ and will log the formatted string:
743
744
#error("fatal: %s", get_error_string());
744
745
~~~~
745
746
747
+ Because the macros ` #debug ` , ` #warn ` , and ` #error ` expand to calls to ` log ` ,
748
+ their arguments are also lazily evaluated.
749
+
746
750
## Assertions
747
751
748
752
The keyword ` assert ` , followed by an expression with boolean type,
You can’t perform that action at this time.
0 commit comments