1 2 3 4 5 6 7 8
use fn_error_context::context; #[context("context {}", arg.as_ref())] async fn do_stuff(arg: impl AsRef<str>) -> anyhow::Result<()> { anyhow::bail!("error {}", arg.as_ref()) } fn main() {}