rust/library/core
Teddy Katz cb653b100c Document that assert! format arguments are evaluated lazily
It can be useful to do some computation in `assert!` format arguments, in order to get better error messages. For example:

```rust
assert!(
    some_condition,
    "The state is invalid. Details: {}",
    expensive_call_to_get_debugging_info(),
);
```

It seems like `assert!` only evaluates the format arguments if the assertion fails, which is useful but doesn't appear to be documented anywhere. This PR documents the behavior and adds some tests.
2021-02-16 00:55:46 -05:00
..
benches Add more benchmarks 2021-01-08 09:50:35 +00:00
src Document that assert! format arguments are evaluated lazily 2021-02-16 00:55:46 -05:00
tests stabilize partition_point 2021-02-12 21:57:17 +09:00
Cargo.toml mv std libs to library/ 2020-07-27 19:51:13 -05:00