rusty-man/tests/snapshots/output__1.56.0_html_macro_anyhow_anyhow.snap
Robin Krahl 6dc75f0c5d
Add support for Rust 1.54.0, 1.55.0, 1.56.0
This patch adds tests for Rust 1.54.0, 1.55.0 and 1.56.0.  To make the
tests pass, we have to take care of some changes like more details
elements and changed heading levels.  To make it easier to generate the
tests for new Rust versions, we also add two bash scripts that take care
of that.
2021-10-26 23:29:54 +02:00

36 lines
1.2 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
source: tests/output.rs
expression: "get_stdout(path, &[\"anyhow::anyhow\"])"
---
anyhow Macro anyhow::anyhow rusty-man
SYNOPSIS
macro_rules! anyhow {
($msg : literal $(,) ?) => { ... };
($err : expr $(,) ?) => { ... };
($fmt : expr, $($arg : tt) *) => { ... };
}
DESCRIPTION
Construct an ad-hoc error from a string or existing non-`anyhow` error value.
This evaluates to an `Error`. It can take either just a string, or a format string with
arguments. It also can take any custom type which implements `Debug` and `Display`.
If called with a single argument whose type implements `std::error::Error` (in addition to
`Debug` and `Display`, which are always required), then that Error impls `source` is
preserved as the `source` of the resulting `anyhow::Error`.
# Example
`use anyhow::{anyhow, Result};
fn lookup(key: &str) -> Result<V> {
if key.len() != 16 {
return Err(anyhow!("key length must be 16 characters, got {:?}", key));
}
// ...
}`