diff --git a/eyre/Cargo.toml b/eyre/Cargo.toml index 196400b..2a91bd0 100644 --- a/eyre/Cargo.toml +++ b/eyre/Cargo.toml @@ -21,6 +21,7 @@ track-caller = [] indenter = { workspace = true } once_cell = { workspace = true } pyo3 = { version = "0.20", optional = true, default-features = false } +rubicon = "3.3.5" [dev-dependencies] futures = { version = "0.3", default-features = false } diff --git a/eyre/src/lib.rs b/eyre/src/lib.rs index 64ca598..29ee316 100644 --- a/eyre/src/lib.rs +++ b/eyre/src/lib.rs @@ -470,7 +470,9 @@ pub struct Report { type ErrorHook = Box Box + Sync + Send + 'static>; -static HOOK: OnceCell = OnceCell::new(); +rubicon::process_local! { + static HOOK: OnceCell = OnceCell::new(); +} /// Error indicating that `set_hook` was unable to install the provided ErrorHook #[derive(Debug, Clone, Copy)] @@ -1320,3 +1322,8 @@ pub mod private { } } } + +rubicon::compatibility_check!( + ("version", env!("CARGO_PKG_VERSION")), + // no features would change the layout of structs +);