Skip to content

Commit

Permalink
mention new format args capture in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
yaahc committed Jan 19, 2022
1 parent ce31c1b commit fa22f7a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,13 @@ handlers for eyre and short summaries of what features they provide.
return Err(eyre!("Missing attribute: {}", missing));
```

- On newer versions of the compiler (e.g. 1.58 and later) this macro also
supports format args captures.

```rust
return Err(eyre!("Missing attribute: {missing}"));
```

## No-std support

**NOTE**: tests are currently broken for `no_std` so I cannot guarantee that
Expand Down
12 changes: 12 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,18 @@
//! # Ok(())
//! # }
//! ```
//! - On newer versions of the compiler (e.g. 1.58 and later) this macro also
//! supports format args captures.
//!
//! ```rust
//! # use eyre::{eyre, Result};
//! #
//! # fn demo() -> Result<()> {
//! # let missing = "...";
//! return Err(eyre!("Missing attribute: {missing}"));
//! # Ok(())
//! # }
//! ```
//!
//! ## No-std support
//!
Expand Down

0 comments on commit fa22f7a

Please sign in to comment.