eyre/eyre/tests/test_context_access.rs
LeoniePhiline 34bd1d9893
feat: introduce an "anyhow" compatibility layer feature flag (#138)
This change hides the `anyhow` compatibility layer behind an `"anyhow"`
feature flag.
In `eyre` v1.0.0 the feature is currently enabled by default.

Fixes #131

---------

Co-authored-by: Freja Roberts <ten3roberts@gmail.com>
2024-01-16 17:10:12 +01:00

16 lines
255 B
Rust

#![cfg(feature = "anyhow")]
mod common;
use crate::common::maybe_install_handler;
#[test]
fn test_context() {
use eyre::{eyre, Report};
maybe_install_handler().unwrap();
let error: Report = eyre!("oh no!");
let _ = error.context();
}